Closed kitten closed 4 months ago
Latest commit: 33bf2f37b1d03b7f85f307de1f7a0c59798a050f
The changes in this PR will be included in the next version bump.
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
Merging since it technically doesn't matter when we land this exactly
Summary
This PR adds support for persisted documents, as long as:
documentId
propertydocumentId
parameter as a replacement for thequery
parameterWhen we detect the
documentId
property on a document which has no definitions (either an empty array or not defined), we send adocumentId
instead of aquery
.This is similar to Automatic Persisted Queries (APQs), but those require the
@urql/exchange-persisted
exchange, to facilitate generating persisted queries on the fly (as per the spec) and retrying them.This is to comply with: https://github.com/graphql/graphql-over-http/pull/264
Set of changes
documentId
property to detected GraphQL document typesdocumentId
onFetchBody
when a persisted document is passed