Skip to content

Commit

Permalink
(fix) - use Record over object type for subscription operation variab…
Browse files Browse the repository at this point in the history
…les (#1119)

* fix: use record over object

* docs: changeset
  • Loading branch information
enisdenjo authored Nov 5, 2020
1 parent 0a2c583 commit 9e9b5ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/breezy-ghosts-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@urql/core': patch
---

Use `Record` over `object` type for subscription operation variables. The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).
2 changes: 1 addition & 1 deletion packages/core/src/exchanges/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface ObservableLike<T> {

export interface SubscriptionOperation {
query: string;
variables?: object;
variables?: Record<string, unknown>;
key: string;
context: OperationContext;
}
Expand Down

0 comments on commit 9e9b5ca

Please sign in to comment.