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
Thank you for this project! I have one request about error messages.
When an error occurs, for example when a custom merge fails because it uses mergeObjects and either one of incoming or existing isn't an array (because perhaps there's a bug on the developer's end), this is the error we get:
Cannot automatically merge arrays
import{ApolloClient,InMemoryCache}from'@apollo/client';constsimpleMerge={merge(existing,incoming,{ mergeObjects }){returnmergeObjects(existing,incoming);// This may fail if either `existing` or `incoming` isn't an array.}};constcacheOptions={typePolicies: {SomeType: {fields: {someTypeItems: simpleMerge,}},};constcache=newInMemoryCache(cacheOptions);
It would be useful to at least have the name of the field involved, e.g.:
Hello,
Thank you for this project! I have one request about error messages.
When an error occurs, for example when a custom merge fails because it uses
mergeObjects
and either one ofincoming
orexisting
isn't an array (because perhaps there's a bug on the developer's end), this is the error we get:It would be useful to at least have the name of the field involved, e.g.:
Something like this would save a lot of hassle and time spent in debugging trying to understand what's going on.
The text was updated successfully, but these errors were encountered: