Changelog
Every release of Relay, newest first. Relay follows semantic versioning: breaking changes only happen in major versions.
#3.2.0
Request deduplication and a smaller bundle.
- AddedIdentical in-flight
GETrequests now share one network call. Turn it off withdedupe: false. - Added
totalTimeoutoption to cap the time spent across all retries. - ChangedBundle size reduced from 2.4 kB to 2.1 kB (min + gzip).
- Fixed
Retry-Afterdates in the past no longer delay the next attempt.
#3.1.2
A patch release with two fixes.
- Fixed
.json()no longer throws on empty 204 responses. - FixedHeaders set by request interceptors are kept when a request is retried.
#3.1.0
Better tools for testing and debugging.
- AddedCustom
fetchoption for tests and server-side rendering. - Added
error.attemptsreports how many tries a failed request took. - FixedQuery parameters with
undefinedvalues are skipped instead of sent as the string "undefined".
#3.0.0
A major release that simplifies errors and drops old runtimes. See the upgrade notes below.
- BreakingAll failures now reject with
RelayError.HTTPErrorandTimeoutErrorwere removed. - BreakingNode.js 16 is no longer supported. The minimum is now Node.js 18.
- Breaking
prefixUrlwas renamed tobaseUrl. - AddedResponse interceptors receive the original request as a second argument.
#Upgrading from 2.x
Search your code for HTTPError and TimeoutError and check error.code instead:
JavaScript
// 2.x
if (error instanceof HTTPError) { /* ... */ }
// 3.x
if (error instanceof RelayError && error.code === 'HTTP_ERROR') { /* ... */ }#2.9.4
The final 2.x release.
- FixedSecurity: redirects to a different origin no longer forward the
Authorizationheader.
Was this page helpful?
Last updated