> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# createQueryKey

[API Reference](https://docs.modelence.com/api-reference/modelence/client/functions/../../../index) / [modelence](https://docs.modelence.com/api-reference/modelence/client/functions/../../index) / [client](https://docs.modelence.com/api-reference/modelence/client/functions/../index) / createQueryKey

> **createQueryKey**\<`T`, `U`>(`methodName`, `args`): [`ModelenceQueryKey`](https://docs.modelence.com/api-reference/modelence/client/functions/../type-aliases/ModelenceQueryKey)\<`T`, `U`>

Defined in: [packages/modelence/src/client/query.ts:212](https://github.com/modelence/modelence/blob/main/packages/modelence/src/client/query.ts#L212)

Builds a query key matching `modelenceQuery(...)` for cache operations.

## Type Parameters

| Type Parameter | Default type |
| - | - |
| `T` *extends* `string` | - |
| `U` *extends* `Args` | `Args` |

## Parameters

| Parameter | Type |
| - | - |
| `methodName` | `T` |
| `args` | `U` |

## Returns

[`ModelenceQueryKey`](https://docs.modelence.com/api-reference/modelence/client/functions/../type-aliases/ModelenceQueryKey)\<`T`, `U`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.