-
-
Notifications
You must be signed in to change notification settings - Fork 796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load babel options in graphql-tag-pluck
#5869
Comments
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
graphql-codegen
was silently ignoring source files and not extracting documents.I was able to track it down to our use of the parser plugin
explicitResourceManagement
, which is declared in the babelrc.But it turns out that
graphql-tag-pluck
hardcodes babel options based on file extensions 1, and passes those directly toparse()
2 without possibility of intervention. It ignores existing babel configuration.Describe the solution you'd like
graphql-tag-plug
should attempt to usebabel.loadPartialConfig
3, and use that if it succeeds.Describe alternatives you've considered
Alternatively, allow passing a list of plugins or babel options overrides through. Note that this might require plumbing up a few levels if interfaces through
CodeFileLoader
andgraphql-codegen
itself to make sure it's properly exposed.Footnotes
https://github.com/ardatan/graphql-tools/blob/848de826f21fddd48fac1a93f6d616df6a135c08/packages/graphql-tag-pluck/src/config.ts#L10 ↩
https://github.com/ardatan/graphql-tools/blob/848de826f21fddd48fac1a93f6d616df6a135c08/packages/graphql-tag-pluck/src/index.ts#L248 ↩
https://babeljs.io/docs/babel-core#loadoptions ↩
The text was updated successfully, but these errors were encountered: