defaultBaseOptions value is not exported in generated file
jovermier opened this issue · 0 comments
jovermier commented
Which packages are impacted by your issue?
@graphql-codegen/typescript-react-apollo
Describe the bug
In the generator config file, setting config options defaultBaseOptions
and having noExport
set to false produces the following output. Notice the value isn't exported.
{
...
plugins: ["typescript-operations", "typescript-react-apollo"],
config: {
...
reactApolloVersion: 3,
defaultBaseOptions: {
context: {
headers: { test: 'hello world' }
}
},
...
}
}
Generated Output:
const defaultOptions = { context: { headers: { test: 'hello world' } } } as const;
Your Example Website or App
na
Steps to Reproduce the Bug or Issue
na
Expected behavior
As a user, I expected that the defaultOptions to be exported when noExport value is false.
Screenshots or Videos
No response
Platform
OS: All of them
NodeJS: 18.16.1
graphql version: 16.8.0
@graphql-codegen/typescript-react-apollo version: 3.3.7
Codegen Config File
No response
Additional context
No response