Conversation
🦋 Changeset detectedLatest commit: 66f8e74 The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Apollo Federation Subgraph Compatibility Results
Learn more: |
💻 Website PreviewThe latest changes are available as preview in: https://25649a3f.graphql-yoga.pages.dev |
✅ Benchmark Results |
d660ad3 to
56eff8c
Compare
| if ( | ||
| 'operationName' in params && | ||
| typeof params.operationName !== 'string' && | ||
| params.operationName != null | ||
| ) { | ||
| throw createGraphQLError(`Invalid operation name in the request body.`, { | ||
| extensions: { | ||
| http: { | ||
| status: 400, | ||
| }, | ||
| }, | ||
| }); | ||
| } |
There was a problem hiding this comment.
This part was missing but required in the http spec. It was caught before by chance...
There was a problem hiding this comment.
How can we ensure we don't introduce a regression? How was this cattched by chance?
| export function isValidOperationName( | ||
| operationName: string | undefined, | ||
| document: DocumentNode, | ||
| ): boolean { | ||
| try { | ||
| checkOperationName(operationName, document); | ||
| return true; | ||
| } catch { | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
Not sure it's needed, just wanted to implement the same pattern that was used for the check of the params
There was a problem hiding this comment.
Where is this function used?
| 'graphql-yoga': patch | ||
| --- | ||
|
|
||
| Improve error messages in case of `operatinName` related errors. |
There was a problem hiding this comment.
What was the error message before?
I also don't see any new tests that ensure that the new error message is used and a regression in the future is avoided.
No description provided.