Interface IQueryClient
- Namespace
- DotNetQuery.Core
- Assembly
- DotNetQuery.Core.dll
The central client for creating and managing queries and mutations. Acts as the cache owner — all queries and mutations created through it share the same cache.
public interface IQueryClient : IDisposable
- Inherited Members
Methods
CreateMutation<TArgs, TData>(MutationOptions<TArgs, TData>)
Creates a mutation. If InvalidateKeys is set, the specified keys are invalidated automatically on success.
IMutation<TArgs, TData> CreateMutation<TArgs, TData>(MutationOptions<TArgs, TData> options)
Parameters
optionsMutationOptions<TArgs, TData>
Returns
- IMutation<TArgs, TData>
Type Parameters
TArgsTData
CreateQuery<TArgs, TData>(QueryOptions<TArgs, TData>)
Gets or creates a query that accepts parameters for the given key. If a query with the same key already exists in the cache, it is returned as-is.
IQuery<TArgs, TData> CreateQuery<TArgs, TData>(QueryOptions<TArgs, TData> options)
Parameters
optionsQueryOptions<TArgs, TData>
Returns
- IQuery<TArgs, TData>
Type Parameters
TArgsTData
Invalidate(QueryKey)
Marks all queries matching the given key as stale and triggers a re-fetch.
void Invalidate(QueryKey key)
Parameters
keyQueryKey
Invalidate(Func<QueryKey, bool>)
Marks all queries whose key matches the predicate as stale and triggers a re-fetch.
void Invalidate(Func<QueryKey, bool> predicate)