facebook / facebook/relay

Invariant violation calling `useFragment` with inline fragment

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

Description

Is it expected that calling `useFragment` on a fragment marked with `@inline` throws an invariant violation?

In other words, shouldn't `isFragment` also account for `RelayConcreteNode.INLINE_DATA_FRAGMENT`?

https://github.com/facebook/relay/blob/970c94ac475ec49deb001fd26980f01351c55b03/packages/relay-runtime/query/GraphQLTag.js#L81-L88

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.