Skip to content

Update to GraphQL-JS v14 #13

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

Closed
MichalLytek opened this issue Oct 9, 2018 · 3 comments
Closed

Update to GraphQL-JS v14 #13

MichalLytek opened this issue Oct 9, 2018 · 3 comments

Comments

@MichalLytek
Copy link
Contributor

Hi @ivome!

I've tried to update graphql-query-complexity to support graphql-js v14 but I got this error while running the tests:

(...)
\graphql-query-complexity\node_modules\graphql\validation\validate.js:89
    throw new Error(errors.map(function (error) {
          ^
Error: Unknown directive "complexity".

Unknown directive "complexity".

Unknown directive "cost".

Unknown directive "complexity".

Unknown directive "complexity".

Unknown directive "complexity".
    at assertValidSDL 
(...)

Because v14 is making better validation of the schema/query:
https://github.com/graphql/graphql-js/releases/tag/v14.0.0

Can you take a look at your test suite and maybe update readme to add info about the demand of registering directives explicitly? 😕

@ivome ivome closed this as completed in f47d05c Oct 9, 2018
@ivome
Copy link
Collaborator

ivome commented Oct 9, 2018

Just upgraded the library to support graphql-js v14. New version is published on NPM

@MichalLytek
Copy link
Contributor Author

Thanks! 🎉
You could just add || ^0.14.0 to not making a breaking change as it's doesn't seem to be needed.

ivome added a commit that referenced this issue Oct 9, 2018
@ivome
Copy link
Collaborator

ivome commented Oct 9, 2018

Done! 😉

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