-
Notifications
You must be signed in to change notification settings - Fork 575
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
Add more tests validating different statuses #2705
Conversation
|
Converting to draft while tests failing |
variables: { status }, | ||
}), | ||
}), | ||
new Response(), |
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.
Actually yoga
handler doesn't work like that.
If you try to mimic yoga(req, res)
, this is different.
There is no Response
passed in Fetch API based servers. It is Node specific and parameters are IncomingMessage
and ServerResponse
.
In Fetch API based servers, the handler takes Request
and returns Response
.
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.
You can see all the combinations here;
https://github.com/ardatan/whatwg-node/blob/master/packages/server/src/types.ts#L29
454eb18
to
e4bce22
Compare
Thanks @domdomegg ! |
❌ Benchmark FailedPerformance regression detected: it seems like your Pull Request adds some extra latency to GraphQL Yoga
|
Related #2655
Went down this rabbit hole trying to identify root cause of odd behaviour of status texts in graphql-yoga. This doesn't make any non-test changes, but given that I've written these tests now I thought they may be helpful to prevent future regressions so figured would at least submit the PR :)