Skip to content

Commit

Permalink
prevent Apollo query errors
Browse files Browse the repository at this point in the history
We're using the apollo-boost package, which provides an in-memory cache.

I think we're not even yet leveraging the cache, but we hit an intermittent error similar to:
https://gist.github.com/jacobwegner/eb8a8761918cc7cd374d1dc39d94609d

I searched and landed on the cache configuration, and saw a mention of not mixing queries with
and without the id field:

https://www.apollographql.com/docs/react/caching/cache-configuration/#assigning-unique-identifiers
https://github.com/apollographql/apollo-client/blob/451482ff85d93e1738df31007f3c2a7f0fbe8cff/packages/apollo-cache-inmemory/src/__tests__/__snapshots__/writeToStore.ts.snap#L4

Adding the id field seems to have resolved the issue
  • Loading branch information
jacobwegner committed Jun 24, 2020
1 parent 5af27fa commit 8461086
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/widgets/AudioWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
passageTextParts(reference: "${this.urn}") {
edges {
node {
id
audioAnnotations {
edges {
node {
Expand Down

0 comments on commit 8461086

Please sign in to comment.