-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[normalize] Possibly include errors & extensions in normalized result #118
Comments
@micimize any thoughts on this? |
Hmm – I kind of don't think related: zino-hofmann/graphql-flutter#753 |
I agree that caching errors isn't strictly a normalization concern. However, in practice, the normalization process determines the structure of the cached data, and if we want to store errors next to data in the cache (which I'd argue we would), normalization would have to take errors into consideration. What's the downside to having |
@smkhalsa well, Things worth considering:
It might make sense to add a |
I'm closing this since I don't plan to implement it. |
Should we be caching GraphQL
errors
&extensions
data? Before we can, we'd have to figure out...Where to include them in the normalized result?
Errors and extensions are relevant to a specific Operation execution. However, we currently store selections from all operations of the same type in a single Map.
For example, we might receive the following server response:
Which would be normalized under the shared
Query
key.In order to save errors and extensions data, we'd need to separate data out for each operation. We could achieve this by flattening the Operation data, using the
OperationName
and variables to create a key, then store thedata
,errors
, andextensions
seperately:How would this impact client read / write functionality?
Should the client's
readQuery
/writeQuery
functions return the entire response (including errors and extensions data), not just the data?The text was updated successfully, but these errors were encountered: