Open jelhan opened 1 year ago
I had an error caused by not querying a field, which was used as keyField in InMemoryCache configuration. It throw the following error:
keyField
InMemoryCache
Invariant Violation: Missing field 'name' while extracting keyFields from {"foo": "bar","__typename":"Post"}
Debugging was very challenging because that error is shadowed. I was able to get that error by putting a breakpoint here: https://github.com/josemarluedke/glimmer-apollo/blob/1e507ec43a21e14cdcb8b4feacd75b47c9b6cbcc/packages/glimmer-apollo/src/-private/query.ts#L75-L90
The error was not logged in console. QueryResource.error was undefined.
QueryResource.error
undefined
I had an error caused by not querying a field, which was used as
keyField
inInMemoryCache
configuration. It throw the following error:Debugging was very challenging because that error is shadowed. I was able to get that error by putting a breakpoint here: https://github.com/josemarluedke/glimmer-apollo/blob/1e507ec43a21e14cdcb8b4feacd75b47c9b6cbcc/packages/glimmer-apollo/src/-private/query.ts#L75-L90
The error was not logged in console.
QueryResource.error
wasundefined
.