# QueryDescriptor

> **QueryDescriptor**\<`Service`, `Transform`\> = `{ [Method in FunctionName<Service>]: { functionName: Method; args?: ReactorArgs<Service, Method, Transform> } }`\[[`FunctionName`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/functionname/)\<`Service`\>\]

Defined in: [react/src/types.ts:727](https://github.com/B3Pay/ic-reactor/blob/f1956947ae037304fce1675a38695964c1aa9e32/packages/react/src/types.ts#L727)

A method of the mutation's own reactor, and optionally one set of its
arguments: the same shape `Reactor.invalidateQueries` takes. Its key is
built by the reactor's `generateQueryKey` when the mutation succeeds, so it
follows a `setCanisterId` and carries the reactor's transform segment. It
is rooted at the canister the mutation was sent to: the reactor's, or the
one the mutation's `callConfig.canisterId` names.

Without `args` it names every query of the method, whatever its args,
infinite queries included. With `args` it names the queries made with those
args by `createQuery`, a query factory or the hooks, and `args: []` names a
method without parameters as no `args` does. An infinite query keys its
page set by its first page's args in another form, which `args` does not
match, and a query of another canister than the mutation's is keyed apart:
name either by its query object or key instead.

## Type Parameters

### Service

`Service` = [`BaseActor`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/baseactor/)

### Transform

`Transform` *extends* [`TransformKey`](https://ic-reactor.b3pay.net/v3/libs/type-aliases/transformkey/) = `"candid"`

## Example

```typescript
invalidateQueries: [
  { functionName: "get_posts" },
  { functionName: "get_post", args: [postId] },
]
```