facebook / facebook/relay

subscription updater store proxy returns undefined instead of record proxy

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

Description

I have the following subscription:

```
const subscription = graphql`
subscription EventSubscription($id: ID!) {
eventChildrenUpdate(id: $id) {
guestEntries {
id
name
}
}
}
`;
```

And create a subscription with an updater:

```
requestSubscription(
relayEnvironment,
{
subscription,
variables: { id: entityId },
updater: store => {
console.log({event: store.get(entityId)});
}
}
);
```

The relay chrome debugger clearly shows that the record with entityId exists in the store, and the same updater function works with mutations, but for some reason the subscription updater returns undefined for that record.

Any ideas why this might be happening and any way to fix or work around this?

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.