I need to generate types for 2 differents schemas, so to avoid clashing with the ts pluging @0no-co/graphqlsp I'm separating them by the use of the gql tag.
The problem is that when I change the presetConfig.gqlTagName to something else that's not graphql or gql when tries to generate the documents it's not able to parse the new tagName creating an empty document array in gql.ts
Your Example Website or App
none
Steps to Reproduce the Bug or Issue
In codegen.ts for the client preset change the gqlTagName to something else. i.e:
presetConfig: {
gqlTagName: 'gqlX',
},
Modify one of the queries w/ the new function name:
Which packages are impacted by your issue?
@graphql-codegen/client-preset
Describe the bug
I need to generate types for 2 differents schemas, so to avoid clashing with the ts pluging
@0no-co/graphqlsp
I'm separating them by the use of the gql tag.The problem is that when I change the
presetConfig.gqlTagName
to something else that's notgraphql
orgql
when tries to generate the documents it's not able to parse the new tagName creating an emptydocument
array ingql.ts
Your Example Website or App
none
Steps to Reproduce the Bug or Issue
In
codegen.ts
for the client preset change thegqlTagName
to something else. i.e:Modify one of the queries w/ the new function name:
const pageCollectionQuery = gqlX(
query PageCollection { pageCollection { items { sys { id } } } }
);export { pageCollectionQuery };
Expected behavior
I expect that the
gql.ts
document variable is populated as expected:Screenshots or Videos
No response
Platform
graphql
: 16.8.1,@graphql-codegen/cli
: 5.0.0,@graphql-codegen/client-preset
: 4.1.0,Codegen Config File
No response
Additional context