github.com/niko0xdev/gqlgen@v0.17.55-0.20240120102243-2ecff98c3e37/init-templates/gqlgen.yml.gotmpl (about) 1 # Where are all the schema files located? globs are supported eg src/**/*.graphqls 2 schema: 3 - graph/*.graphqls 4 5 # Where should the generated server code go? 6 exec: 7 filename: graph/generated.go 8 package: graph 9 10 # Uncomment to enable federation 11 # federation: 12 # filename: graph/federation.go 13 # package: graph 14 15 # Where should any generated models go? 16 model: 17 filename: graph/model/models_gen.go 18 package: model 19 20 # Where should the resolver implementations go? 21 resolver: 22 layout: follow-schema 23 dir: graph 24 package: graph 25 filename_template: "{name}.resolvers.go" 26 # Optional: turn on to not generate template comments above resolvers 27 # omit_template_comment: false 28 29 # Optional: turn on use ` + "`" + `gqlgen:"fieldName"` + "`" + ` tags in your models 30 # struct_tag: json 31 32 # Optional: turn on to use []Thing instead of []*Thing 33 # omit_slice_element_pointers: false 34 35 # Optional: turn on to omit Is<Name>() methods to interface and unions 36 # omit_interface_checks : true 37 38 # Optional: turn on to skip generation of ComplexityRoot struct content and Complexity function 39 # omit_complexity: false 40 41 # Optional: turn on to not generate any file notice comments in generated files 42 # omit_gqlgen_file_notice: false 43 44 # Optional: turn on to exclude the gqlgen version in the generated file notice. No effect if `omit_gqlgen_file_notice` is true. 45 # omit_gqlgen_version_in_file_notice: false 46 47 # Optional: turn off to make struct-type struct fields not use pointers 48 # e.g. type Thing struct { FieldA OtherThing } instead of { FieldA *OtherThing } 49 # struct_fields_always_pointers: true 50 51 # Optional: turn off to make resolvers return values instead of pointers for structs 52 # resolvers_always_return_pointers: true 53 54 # Optional: turn on to return pointers instead of values in unmarshalInput 55 # return_pointers_in_unmarshalinput: false 56 57 # Optional: wrap nullable input fields with Omittable 58 # nullable_input_omittable: true 59 60 # Optional: set to speed up generation time by not performing a final validation pass. 61 # skip_validation: true 62 63 # Optional: set to skip running `go mod tidy` when generating server code 64 # skip_mod_tidy: true 65 66 # gqlgen will search for any type names in the schema in these go packages 67 # if they match it will use them, otherwise it will generate them. 68 autobind: 69 # - "{{.}}/graph/model" 70 71 # This section declares type mapping between the GraphQL and go type systems 72 # 73 # The first line in each type will be used as defaults for resolver arguments and 74 # modelgen, the others will be allowed when binding to fields. Configure them to 75 # your liking 76 models: 77 ID: 78 model: 79 - github.com/niko0xdev/gqlgen/graphql.ID 80 - github.com/niko0xdev/gqlgen/graphql.Int 81 - github.com/niko0xdev/gqlgen/graphql.Int64 82 - github.com/niko0xdev/gqlgen/graphql.Int32 83 Int: 84 model: 85 - github.com/niko0xdev/gqlgen/graphql.Int 86 - github.com/niko0xdev/gqlgen/graphql.Int64 87 - github.com/niko0xdev/gqlgen/graphql.Int32