You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
subscriptions-transport-ws subscriptionClient: Observable<ExecutionResult<ExecutionResultDataDefault>> is not assignable to type SubscriptionForwarder
#8
Open
DanielLarsenNZ opened this issue
Jan 8, 2020
· 0 comments
When I npm run serve this (with vue-cli) I get Typescript error:
10:3 Type '(op: Operation) => Observable<ExecutionResult<ExecutionResultDataDefault>>' is not assignable to type 'SubscriptionForwarder'.
Type 'Observable<ExecutionResult<ExecutionResultDataDefault>>' is not assignable to type 'ObservableLike<OperationResult>'.
Types of property 'subscribe' are incompatible.
Type '(observer: Observer<ExecutionResult<ExecutionResultDataDefault>>) => { unsubscribe: () => void; }' is not assignable to type '(observer: ObserverLike<OperationResult>) => Unsub'.
Types of parameters 'observer' and 'observer' are incompatible.
Type 'ObserverLike<OperationResult>' is not assignable to type 'Observer<ExecutionResult<ExecutionResultDataDefault>>'.
Types of property 'next' are incompatible.
Type '(value: OperationResult) => void' is not assignable to type '(value: ExecutionResult<ExecutionResultDataDefault>) => void'.
Types of parameters 'value' and 'value' are incompatible.
Type 'ExecutionResult<ExecutionResultDataDefault>' is not assignable to type 'OperationResult'. Property 'data' is optional in type 'ExecutionResult<ExecutionResultDataDefault>' but required in type 'OperationResult'.
8 | const client = createClient({
9 | url: 'http://localhost:4000/graphql',
> 10 | subscriptionForwarder: op => subscriptionClient.request(op)
| ^
11 | });
12 | Vue.config.productionTip = false
13 |
Version: typescript 3.5.3
Time: 4819ms
I love this library but I am having trouble getting the Subscription client set up. Here is my code (copied from your docs):
When I npm run serve this (with vue-cli) I get Typescript error:
package.json:
What am I doing wrong here? 🤔
The text was updated successfully, but these errors were encountered: