codegen.config.yml 883 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. overwrite: true
  2. schema:
  3. - ${VITE_PRODUCTION_ORION_URL}
  4. - ./src/api/schemas/schema.client.graphql
  5. documents:
  6. - './src/api/queries/**/*.graphql'
  7. config:
  8. scalars:
  9. DateTime: Date
  10. BigInt: string
  11. preResolveTypes: true # avoid using Pick
  12. generates:
  13. src/api/schemas/orion.json:
  14. plugins:
  15. - introspection
  16. config:
  17. minify: true
  18. src/api/queries/__generated__/baseTypes.generated.ts:
  19. hooks:
  20. afterOneFileWrite:
  21. - prettier --write
  22. - eslint --fix
  23. plugins:
  24. - typescript
  25. src/api/queries/__generated__/:
  26. preset: near-operation-file
  27. presetConfig:
  28. baseTypesPath: baseTypes.generated.ts
  29. folder: __generated__
  30. extension: .generated.tsx
  31. hooks:
  32. afterOneFileWrite:
  33. - prettier --write
  34. - eslint --fix
  35. plugins:
  36. - typescript-operations
  37. - typescript-react-apollo