Skip to content

Commit

Permalink
Handle non-src dirs for TypeScript documents (#10792)
Browse files Browse the repository at this point in the history
Co-authored-by: Lenz Weber-Tronic <[email protected]>
  • Loading branch information
ddimaria and phryneas authored Sep 14, 2023
1 parent ae2651a commit 9908ab4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/source/development-testing/static-typing.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
schema: '<URL_OF_YOUR_GRAPHQL_API>',
documents: ['src/**/*.tsx'],
// this assumes that all your source files are in a top-level `src/` directory - you might need to adjust this to your file structure
documents: ['src/**/*.{ts,tsx}'],
generates: {
'./src/__generated__/': {
preset: 'client',
Expand Down

0 comments on commit 9908ab4

Please sign in to comment.