We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently to invalidate a cached query I'm doing:
invalidateCachedQuery(queryDocument) { final cacheQueries = _store.get('Query'); if (cacheQueries == null) return; final cachedNodeDefinition = queryDocument.definitions.whereType().first; final topLevelSelectionSet = cachedNodeDefinition?.selectionSet?.selections; topLevelSelectionSet.forEach((selection) { final cacheKey = selection.name.value; if (cacheKey != '__typename' && cacheQueries.containsKey(cacheKey)) { cacheQueries.remove(cacheKey); } }); } invalidateCachedQuery$GetState() { invalidateCachedQuery(documentNodeQueryGetState); }
It would be great if there was a shorthand like client.invalidateQuery$GetState() that handled this for all queries.
client.invalidateQuery$GetState()
The text was updated successfully, but these errors were encountered:
I updated the example code based on #173, looks like they're trying to accomplish a similar goal of flagging cached queries as invalid.
Sorry, something went wrong.
No branches or pull requests
Currently to invalidate a cached query I'm doing:
It would be great if there was a shorthand like
client.invalidateQuery$GetState()
that handled this for all queries.The text was updated successfully, but these errors were encountered: