Skip to content

Commit

Permalink
OptimisticMutationResolver could return scalar (#1765)
Browse files Browse the repository at this point in the history
  • Loading branch information
taneba authored Jul 3, 2021
1 parent d80b524 commit 891a17a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/quiet-pants-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@urql/exchange-graphcache': minor
---

Fixed typing of OptimisticMutationResolver.
2 changes: 1 addition & 1 deletion exchanges/graphcache/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export type UpdatesConfig = {

export type OptimisticMutationResolver<
Args = Variables,
Result = Link<Data>
Result = Link<Data> | Scalar
> = {
bivarianceHack(vars: Args, cache: Cache, info: ResolveInfo): Result;
}['bivarianceHack'];
Expand Down

0 comments on commit 891a17a

Please sign in to comment.