codegen.config.yml 724 B

123456789101112131415161718192021222324252627282930313233
  1. overwrite: true
  2. schema: './src/api/schemas/**/*.graphql'
  3. documents:
  4. - './src/api/queries/**/*.graphql'
  5. config:
  6. scalars:
  7. DateTime: Date
  8. preResolveTypes: true # avoid using Pick
  9. generates:
  10. src/api/queries/__generated__/baseTypes.generated.ts:
  11. hooks:
  12. afterOneFileWrite:
  13. - prettier --write
  14. - eslint --fix
  15. plugins:
  16. - typescript
  17. src/api/queries/__generated__/:
  18. preset: near-operation-file
  19. presetConfig:
  20. baseTypesPath: baseTypes.generated.ts
  21. folder: __generated__
  22. extension: .generated.tsx
  23. hooks:
  24. afterOneFileWrite:
  25. - prettier --write
  26. - eslint --fix
  27. plugins:
  28. - typescript-operations
  29. - typescript-react-apollo