Table of Contents

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

options MutationOptions<TArgs, TData>

Returns

IMutation<TArgs, TData>

Type Parameters

TArgs
TData

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

options QueryOptions<TArgs, TData>

Returns

IQuery<TArgs, TData>

Type Parameters

TArgs
TData

Invalidate(QueryKey)

Marks all queries matching the given key as stale and triggers a re-fetch.

void Invalidate(QueryKey key)

Parameters

key QueryKey

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)

Parameters

predicate Func<QueryKey, bool>