facebook / facebook/relay

Unknown field "__token" when using @fetchable

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

Description

https://relay.dev/docs/next/guided-tour/refetching/refetching-fragments-with-different-data/ mentions the ability to use @fetchable for refetchable fragments rather than needing to implement the Node type. I followed a guide (https://dev.to/marais/fetchable-with-relay-1meb) to doing this, but ran into an issue with `"__token"` not being defined for my @fetchable type. I tried adding a custom handler for this directive on my backend (apollo server), but it wouldn't let me override a field prefixed with `"__"` (internal field).

Is better support for this on the way, or is this just deprecated / unsupported externally? It would be much nicer if I could avoid bloating my `Query.node` field with every single type

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.