Created
January 6, 2023 16:57
-
-
Save 2wce/9e44b3c9a54f62ac521947be4ea851a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CodegenConfig } from '@graphql-codegen/cli'; | |
const config: CodegenConfig = { | |
schema: [ | |
{ | |
[process.env.API_URL]: { | |
headers: { | |
Authorization: `Bearer ${process.env.TOKEN}` | |
} | |
} | |
} | |
], | |
generates: { | |
'./src/generated/index.ts': { | |
plugins: [ | |
'typescript', | |
'typescript-operations', | |
'typescript-react-apollo' | |
], | |
config: { | |
noHOC: true, | |
noComponents: true, | |
noNamespaces: true, | |
withHooks: true, | |
withSubscriptionHooks: true | |
} | |
} | |
}, | |
documents: 'src/graphql/**/*.graphql', | |
overwrite: true | |
}; | |
export default config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment