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
Upgrade to graphql 16 #686
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,6 +129,7 @@ function getStubTypes (schemaDefinitions, isGateway) { | |
|
||
function gatherDirectives (type) { | ||
let directives = [] | ||
/* istanbul ignore else seems that extensionASTNodes is always provided in graphql16+, we are keeping this check for safety */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is this comment doing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In graphql 15 Now it is only I've added this comment to get the 100% coverage and explain why I didn't get rid of it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok so this comment mixes an istanbul command with human-readable information. |
||
if (type.extensionASTNodes) { | ||
for (const node of type.extensionASTNodes) { | ||
/* istanbul ignore else we are not interested in nodes that does not have directives */ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,5 +43,4 @@ type User { | |
} | ||
|
||
union _Entity = Product | User | ||
|
||
` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got this error
error.toJSON is not a function
That's because they changed the
formatError
impl to simply doreturn error.toJSON();
I thought it was safer to move to
new GraphQLError
Should I go back to
Object.create
?Doing
Object.create(GraphQLError.prototype,
would also solve the issue