Skip to content
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

Respecting importDocumentNodeExternallyFrom: near-operation-file #15

Closed
Pikachews opened this issue Sep 17, 2020 · 2 comments
Closed

Respecting importDocumentNodeExternallyFrom: near-operation-file #15

Pikachews opened this issue Sep 17, 2020 · 2 comments

Comments

@Pikachews
Copy link

According to the documentation in graphql-code-generator (https://graphql-code-generator.com/docs/plugins/typescript-apollo-next#importdocumentnodeexternallyfrom`, setting

documentMode: external
importDocumentNodeExternallyFrom: near-operation-file

should properly import document nodes from the files created using the near-operation-file preset, but according to the source code and the output I'm getting, that doesn't seem to be the case. Instead, it tries to directly import

import * as Operations from "near-operation-file";

Would it be possible to fix this behavior? Thanks!

@Pikachews
Copy link
Author

Sorry, looks like I was fundamentally misunderstanding how to use the near-operation-file preset, not due to this plugin!

@mmahalwy
Copy link

@Pikachews can you explain more? I have the same problem too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants