-
-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
'@urql/exchange-graphcache': minor | ||
--- | ||
|
||
Implement **local directives**. It’s now possible to add client-only directives to queries by adding them to the `cacheExchange`’s new `directives` option. | ||
Directives accept an object of their arguments and return a resolver. When a field is annotated with | ||
a resolver, e.g. `@_optional` or `@_required`, their resolvers from the `directives` config are | ||
executed. This means it’s now possible to use `@_relayPagination` for example, by passing adding | ||
the `relayPagination` helper to the config. | ||
Due to the change in [#3317](https://github.com/urql-graphql/urql/pull/3317), any directive in | ||
queries that’s prefixed with an underscore (`_`) is only visible to Graphcache and not the API. | ||
|
||
See: https://github.com/urql-graphql/urql/pull/3306 |