Repository navigation
Discover and automatically select transport methods - #4665
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: f8a25f9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
2 of 8 tasks
OPTIONS
trevor-scheer
marked this pull request as ready for review
October 23, 2026 11:35
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
createTransportdefaults to POST and requires callers to enumerate other supported methods. The toolbar's method selector also implies that its selection controls mutations, even though safe methods cannot carry them. RFC 10008 describes discovering method support through OPTIONS and Allow.When
supportedMethodsis omitted, the transport discovers capabilities before its first HTTP operation using the effective headers. Concurrent operations share discovery, header changes trigger it again, and a two-second timeout or unavailable discovery falls back to POST (or the configuredmethod). ExplicitsupportedMethodsbypasses discovery. A valid advertisement with no usable methods prevents execution. This discovers methods only, withoutAccept-Queryformat negotiation or automatic retries.Queries automatically prefer QUERY, then POST, then GET. Mutations and operations whose type cannot be determined require POST.
method: 'GET'ortransport.setMethod?.('GET')overrides queries for testing; unavailable overrides reject queries without silently choosing another method. CallingsetMethod()restores automatic selection. For GET queries and POST mutations without discovery, configuremethod: 'GET', supportedMethods: ['GET', 'POST']. GET encodes the operation and variables in the URL without a body. Request selection is captured per send, and cancellation doesn't abort another operation's shared discovery.The top bar's chip and switcher are removed. Each HTTP response carries an optional
TransportResponse.method, which the response pane shows beside status, timing, and size, including for error responses and incremental chunks. GraphiQL delegates routing to the transport and displays response metadata directly, without capability subscriptions or duplicate selection state. Socket events and custom transports that cannot report a method omit it. Custom transports remain responsible for mutation safety.The RC-only changeset explains the change from earlier RCs. The consolidated
transport-api.mdentry describes the final API, and #4598 removes the standalone note after this RC publishes.