urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.57k stars 444 forks source link

Feat/contentful apq support #3416

Closed soleo closed 9 months ago

soleo commented 9 months ago

Resolves #3415

Summary

Contentful GraphQL API started Automatic Persisted Query support recently, https://www.contentful.com/developers/changelog/#automatic-persisted-queries-support-in-the-graphql-api. However, their way to triggering re-fetch for missing persisted query is different from Apollo's implementation.

Contenful: PERSISTED_QUERY_NOT_FOUND as error code https://www.contentful.com/developers/docs/references/graphql/#/reference/automatic-persisted-queries

Apollo:

{ errors: [ { message: 'PersistedQueryNotFound' } ] } https://www.apollographql.com/docs/react/api/link/persisted-queries/

Set of changes

Add new changes for persisted-exchange to support Contentful style error code

changeset-bot[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: e7fddd13adf794d7714935016614069afb1f93cc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------------------ | ----- | | @urql/exchange-persisted | Patch |

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