From 9aae77b179dd43aedace53956a49b2caf9d7a987 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Thu, 14 Sep 2023 16:43:40 +0200 Subject: [PATCH] apply suggestion --- docs/source/development-testing/static-typing.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/source/development-testing/static-typing.md b/docs/source/development-testing/static-typing.md index 714db5646bc..c08fdee5f3f 100644 --- a/docs/source/development-testing/static-typing.md +++ b/docs/source/development-testing/static-typing.md @@ -26,7 +26,8 @@ import { CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { schema: '', - 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', @@ -44,8 +45,6 @@ export default config; > There are multiple ways to [specify a schema](https://www.the-guild.dev/graphql/codegen/docs/config-reference/schema-field#root-level) in your `codegen.ts`, so pick whichever way works best for your project setup. -> Your `documents` might exist in directories other than `src` and may include `ts` files, please adjust accordingly. To catch everything, consider implementing: `documents: ['**/*.{ts,tsx}']`. - Finally, we'll add the following scripts to our `package.json` file: ```json title="package.json"