Skip to content

Update to GraphQL-JS v14 #13

Closed
Closed
@MichalLytek

Description

@MichalLytek

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? 😕

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions