facebook / facebook/relay

Mismatch type between relay and subscriptions-transport-ws

Open
#3,091 4 comments 1 reaction 0 assignees View on GitHub
wontfix
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Hi. I have problem with typing relay subscription.

(I reffered https://github.com/facebook/relay/pull/3062)

Below is the subscribe function with relay.

Screen Shot 2020-06-04 at 2 38 34 PM

There is type error.

Screen Shot 2020-06-04 at 2 39 17 PM

I resolved the error by modifying `node_modules/subscriptions-transport-ws/dist/client.d.ts`

Screen Shot 2020-06-04 at 2 46 24 PM

However it's not reasonable modify I think, since `subscriptions-transport-ws` is not part of relay modules. It is external module.

Also, I tried to like this.
```typescript
return Observable.from(subscribeObservable);
```

I would like to shared my opinion with you.
Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.