-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add request extensions #4113
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
base: main
Are you sure you want to change the base?
Add request extensions #4113
Conversation
🦋 Changeset detectedLatest commit: ecb2b92 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 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 |
/** | ||
* A hash that is unique for a combination of the contents of the query | ||
* editor, the variables editor and the request headers editor (i.e., all the editor | ||
* editor, the variables editor, the request headers editor, and the extensions editor (i.e., all the editor |
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.
* editor, the variables editor, the request headers editor, and the extensions editor (i.e., all the editor | |
* editor, the variables editor, the request headers editor, and the extensions editor (i.e., all the editors |
@dimaMachina following on from our previous discussion, could you help me review this PR? |
Adds support for GraphQL request
extensions
. Adds a tab to the UI to allow users to sendextensions
alongside their GraphQL request, similar to variables and headers.extensions
is a map that can be included in the GraphQL request, and is part of the GraphQL-over-HTTP spec but not yet implemented in GraphiQL. It's handy for sending non-typed extra information inside the GraphQL payload. It's particularly useful if you can't rely on URL params or headers to pass along additional information. Spec link: https://graphql.github.io/graphql-over-http/draft/#sec-Request-ParametersThis PR addresses #3372 and is an updated version of #3409
I am not very familiar with React nor TypeScript so please let me know your comments. I've also manually tested by running GraphiQL locally and inspecting the outgoing GraphQL request in the network tab as shown in the picture above.