github.com/kubeshop/testkube@v1.17.23/gqlgen.yml (about)

     1  # Where are all the schema files located? globs are supported eg  src/**/*.graphqls
     2  schema:
     3    - internal/graphql/**/*.graphqls
     4  
     5  # Where should the generated server code go?
     6  exec:
     7    filename: internal/graphql/gen/generated.go
     8    package: gen
     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: internal/graphql/gen/models.go
    18    package: gen
    19  
    20  # Where should the resolver implementations go?
    21  resolver:
    22    layout: follow-schema
    23    dir: internal/graphql/resolvers
    24    package: resolvers
    25    filename_template: "{name}_resolver.go"
    26  
    27  # Optional: turn on use ` + "`" + `gqlgen:"fieldName"` + "`" + ` tags in your models
    28  # struct_tag: json
    29  
    30  # Optional: turn on to use []Thing instead of []*Thing
    31  omit_slice_element_pointers: true
    32  
    33  # Optional: turn off to make struct-type struct fields not use pointers
    34  # e.g. type Thing struct { FieldA OtherThing } instead of { FieldA *OtherThing }
    35  struct_fields_always_pointers: false
    36  
    37  # Optional: turn off to make resolvers return values instead of pointers for structs
    38  resolvers_always_return_pointers: false
    39  
    40  # Optional: set to speed up generation time by not performing a final validation pass.
    41  # skip_validation: true
    42  
    43  # gqlgen will search for any type names in the schema in these go packages
    44  # if they match it will use them, otherwise it will generate them.
    45  autobind:
    46    - "github.com/kubeshop/testkube/pkg/api/v1/testkube"
    47  
    48  # This section declares type mapping between the GraphQL and go type systems
    49  #
    50  # The first line in each type will be used as defaults for resolver arguments and
    51  # modelgen, the others will be allowed when binding to fields. Configure them to
    52  # your liking
    53  models:
    54    ID:
    55      model:
    56        - github.com/99designs/gqlgen/graphql.ID
    57        - github.com/99designs/gqlgen/graphql.Int
    58        - github.com/99designs/gqlgen/graphql.Int64
    59        - github.com/99designs/gqlgen/graphql.Int32
    60    Int:
    61      model:
    62        - github.com/99designs/gqlgen/graphql.Int
    63        - github.com/99designs/gqlgen/graphql.Int64
    64        - github.com/99designs/gqlgen/graphql.Int32
    65    StringMap:
    66      model:
    67        - github.com/kubeshop/testkube/internal/graphql/scalars.StringMapScalar