Sorry for the quick writeup, I may come back and expand more:
Warning: RelayResponseNormalizer: Payload did not contain a value for field __typename: __typename. Check that you are parsing with the same query that was used to fetch the payload. doesn't tell you what query caused this
- this can be caused if you have a variable
$skip: true, and two fragments
query Q($skip: Boolean!) {
...A
...B
}
fragment A {
field @skip(if: $skip)
}
fragment B {
field # no skip
}
- This is especially difficult to debug if
field is __typename!
- Not to mention, impossible to debug if you have no idea why it's happening.
- We have situations like the above. We are, in a particular query Q1, attempting to avoid fetching a specific field. So, fragments which are part of that query but also part of other queries get
@skip(if: $skip). In those other queries, there are fragments that select the same field, but aren't part of Q1. So, by default, they don't get that fragment spread, and we get this error, at least during tests. (It may also occur if prod if we land this. Who knows!)
Sorry for the quick writeup, I may come back and expand more:
Warning: RelayResponseNormalizer: Payload did not contain a value for field__typename: __typename. Check that you are parsing with the same query that was used to fetch the payload.doesn't tell you what query caused this$skip: true, and two fragmentsfieldis __typename!@skip(if: $skip). In those other queries, there are fragments that select the same field, but aren't part of Q1. So, by default, they don't get that fragment spread, and we get this error, at least during tests. (It may also occur if prod if we land this. Who knows!)