Removal of ID from facets entries GQL type
- Navigate to your client code where the GQL query is made
- Locate the GQL query, should be something similar to below
- locate the facets entries GQL query in the query
- remove the
idfield in entries object. Reason for removal was Apollo cache was using this id and denormalising the cache, keeping a cache record for each facet entry.
The issue arises when the cache is reused for a different search state. For example, going from no query string to a query string will bring back different facet entries. When the user goes back to no query string, Apollo cache will reuse the facet entry for the one with a query string, potentially showing incorrect count.
- Your GQL query should look similar to this