Closed lucashfreitas closed 2 years ago
pluckConfig
should be used to define how to extract GraphQL related code from TS and JS files. It is not for gql imports in the generated files;
You can configure the package gql
tag should be imported from by using gqlImport
as shown here;
https://www.graphql-code-generator.com/plugins/typescript-graphql-request
Thanks @ardatan !
Describe the bug
Hello, I am trying to use pluckConfig to remove
gql
from graphl-tag and use my custom ggl tag module but the pluck config doesn't seems to be working.I have added the config in the root
codegen.yml
file as stated in the docs https://www.graphql-code-generator.com/docs/config-reference/codegen-config.The generated file is still importing the gql from
graphql-tag
.To Reproduce
I have created a minimal repository that reproduces the issue. It's available here https://github.com/lucashfreitas/graphql-codegen-pluckConfigIssue. Note that despite we have pluckConfig modules set in codegen the generated graphql is still importing the
gq;
fromgraphql-tag
.npm install
oryarn
to install the depencies.yarn codegen
and note that the graphql generated will import thegql
fromgraphql-tag
despite the pluckConfig is set to a different module.Environment:
@graphql-codegen/...
: 2.3.1"