Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

graphql-tag-pluck peer dependency #452

Closed
loremaps opened this issue Jul 23, 2019 · 4 comments
Closed

graphql-tag-pluck peer dependency #452

loremaps opened this issue Jul 23, 2019 · 4 comments
Labels
📦 released This issue or pull request is released

Comments

@loremaps
Copy link
Contributor

Hi,

It seems that graphql-tag-pluck is now a peer-dependency of graphql-toolkit since v0.3.2:
ardatan/graphql-toolkit#152

Should we add graphql-tag-pluck as a dependency (or peer) of @graphql-inspector/load package? Or I am missing something else?

With v1.22.0 I am getting the following error using a command like graphql-inspector validate 'src/app/**/*.ts' ./schema.graphql:

error Error: Cannot find module 'graphql-tag-pluck'
Require stack:
- /builds/covis-greece/aifind/node_modules/graphql-toolkit/dist/commonjs/utils/extract-document-string-from-code-file.js
- /builds/covis-greece/aifind/node_modules/graphql-toolkit/dist/commonjs/utils/index.js
- /builds/covis-greece/aifind/node_modules/graphql-toolkit/dist/commonjs/epoxy/merge-schemas.js
- /builds/covis-greece/aifind/node_modules/graphql-toolkit/dist/commonjs/epoxy/index.js
- /builds/covis-greece/aifind/node_modules/graphql-toolkit/dist/commonjs/index.js
- /builds/covis-greece/aifind/node_modules/@graphql-inspector/load/dist/documents.js
- /builds/covis-greece/aifind/node_modules/@graphql-inspector/load/dist/index.js
- /builds/covis-greece/aifind/node_modules/@graphql-inspector/cli/dist/commands/diff.js
- /builds/covis-greece/aifind/node_modules/@graphql-inspector/cli/dist/index.js at ./jobtopus-ui/src/app/app.component.spec.ts
@kamilkisiela
Copy link
Owner

Yes but I didn't notice that change in graphql-toolkit. Hmm I will talk with the team why we move it into peerDeps.

@kamilkisiela
Copy link
Owner

#577

@kamilkisiela kamilkisiela added the ⏳ waiting for release This issue or pull request is waiting to be released label Sep 3, 2019
@kamilkisiela
Copy link
Owner

v1.24.0

@kamilkisiela kamilkisiela added 📦 released This issue or pull request is released and removed ⏳ waiting for release This issue or pull request is waiting to be released labels Sep 3, 2019
@loremaps
Copy link
Contributor Author

loremaps commented Oct 9, 2019

@kamilkisiela sorry for taking so much to test this 😞

After this fix I am getting the following error, when I try to validate .ts docs:

error GraphQL template literals cannot be plucked from a TypeScript code without having the "typescript" package installed.
Please install it and try again.

According to this DAB0mB/graphql-tag-pluck#11 typescript is to be dynamically loaded when needed. Indeed if I install typescript everything works fine.

Do you think it should be a peer-dependency here or upstream on ardatan/graphql-toolkit or DAB0mB/graphql-tag-pluck? Or maybe a note on the documentation is enough?

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
📦 released This issue or pull request is released
Projects
None yet
Development

No branches or pull requests

2 participants