You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nodeId here is a base64 encoded object of the table id and table name in postgres.
In a query like:
query {
records {
nodes {
id
}
}
}
the response normalizer will log
Warning: RelayResponseNormalizer: Invalid record `9`. Expected __typename to be consistent, but the record was assigned conflicting types `Account` and `Company`. The GraphQL server likely violated the globally unique id requirement by returning the same id for different objects.
we currently get around this by doing:
new Environment({
getDataID: (fieldValue) => fieldValue.nodeId,
})
but that isn't documented and probably breaks other things. one of note is it seems that routine updates don't reflect in the cache and have to be manually updated via updater or we have to bust the entire cache and refetch.
Things work fine if we don't fetch id, but that doesn't work because of how our mutations are laid out.
The text was updated successfully, but these errors were encountered:
It seems like the default getDataID function use the noderInterfaceIdField in the schemaConfig? With that value being defaulted to id rather than hardcoded to id itself? Happy to pr this if there is agreement here.
We like to use
nodeId
as a cache key andid
as routing/identifiers in our API.we have the following config:
nodeId
here is a base64 encoded object of the table id and table name in postgres.In a query like:
the response normalizer will log
we currently get around this by doing:
but that isn't documented and probably breaks other things. one of note is it seems that routine updates don't reflect in the cache and have to be manually updated via
updater
or we have to bust the entire cache and refetch.Things work fine if we don't fetch
id
, but that doesn't work because of how our mutations are laid out.The text was updated successfully, but these errors were encountered: