codegen.yml 670 B

12345678910111213141516171819202122232425262728
  1. overwrite: true
  2. schema:
  3. - backend/schema.graphql
  4. documents: 'frontend/src/**/*.graphql'
  5. generates:
  6. frontend/src/gql/index.tsx:
  7. config:
  8. skipTypename: true
  9. maybeValue: T | undefined
  10. withHooks: true
  11. withComponent: false
  12. withHOC: false
  13. apolloReactHooksImportFrom: '@apollo/client'
  14. gqlImport: '@apollo/client#gql'
  15. plugins:
  16. - add: '/* eslint-disable */'
  17. - 'typescript'
  18. - 'typescript-operations'
  19. - 'typescript-react-apollo'
  20. backend/src/gql/resolvers.ts:
  21. config:
  22. - defaultMapper: Partial<{T}>
  23. - useIndexSignature: true
  24. plugins:
  25. - typescript
  26. - typescript-resolvers