facebook / relay

Relay is a JavaScript framework for building data-driven React applications.
https://relay.dev
MIT License
18.24k stars 1.8k forks source link

refetching fragment fails due to relay not including the id in the variables #4705

Closed MichaelB-99 closed 1 week ago

MichaelB-99 commented 1 week ago

since v16 refetching a refetchable fragment on a type that implements the node interface doesn't work due to relay not including the id variable in the node query.

This can be worked around by including the id in the variables of the refetch function.

Reproduction

I've modified the TodoMVC example to reproduce this behaviour. Check out the repo

MichaelB-99 commented 1 week ago

Never mind, I forgot to update relay-compiler when I was updating react-relay and relay-runtime 🤦. All good now!