I have a query that gets a specific user from a list by id (UUID).
When I call the server I get a single user back but when i call the cache i get all users back.
The only way I have “fixed” this is by adding fetchPolicy: 'no-cache',
But I feel I should get the same response from the server and the cache?
Query:
query Users {
users(where: {id: {_eq: "4188e081-7850-4819-905b-4c9072da8741"}}) {
first_name
id
}
}
I use the chrome plugin to verify the response from client and server, see screenshots:
As new user i can only add one media item to a post, here’s the other screen shot of the server response to the same query:
The client cache doesn’t currently support filters like this. If you would like to see this added, please start a discussion in the Apollo Client feature request repo. Thanks!
I don’t understand why the cache wouldn’t respect the query? what would people do in these scenarios?
Don’t know if this will help another in the same situation but I couldn’t work around this so ended up switching to URQL, urql (React) | urql Documentation