gqlgen.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Where are all the schema files located? globs are supported eg src/**/*.graphqls
  2. schema:
  3. - internal/graph/schemas/*.graphql
  4. # Where should the generated server code go?
  5. exec:
  6. filename: internal/graph/generated/generated.go
  7. package: generated
  8. # Uncomment to enable federation
  9. # federation:
  10. # filename: graph/generated/federation.go
  11. # package: generated
  12. # Where should any generated models go?
  13. model:
  14. filename: internal/graph/model/generated.go
  15. package: model
  16. # Where should the resolver implementations go?
  17. resolver:
  18. filename: internal/graph/resolvers/generated/generated.go
  19. type: Resolver
  20. package: resolvers
  21. # Optional: turn on use `gqlgen:"fieldName"` tags in your models
  22. # struct_tag: json
  23. # Optional: turn on to use []Thing instead of []*Thing
  24. # omit_slice_element_pointers: false
  25. # Optional: set to speed up generation time by not performing a final validation pass.
  26. # skip_validation: true
  27. # gqlgen will search for any type names in the schema in these go packages
  28. # if they match it will use them, otherwise it will generate them.
  29. autobind:
  30. - "github.com/xinliangnote/go-gin-api/internal/graph/model"
  31. # This section declares type mapping between the GraphQL and go type systems
  32. #
  33. # The first line in each type will be used as defaults for resolver arguments and
  34. # modelgen, the others will be allowed when binding to fields. Configure them to
  35. # your liking
  36. models:
  37. ID:
  38. model:
  39. - github.com/99designs/gqlgen/graphql.ID
  40. - github.com/99designs/gqlgen/graphql.Int
  41. - github.com/99designs/gqlgen/graphql.Int64
  42. - github.com/99designs/gqlgen/graphql.Int32
  43. Int:
  44. model:
  45. - github.com/99designs/gqlgen/graphql.Int
  46. - github.com/99designs/gqlgen/graphql.Int64
  47. - github.com/99designs/gqlgen/graphql.Int32