---
sidebar_position: 6
title: Setting Query Params Type
sidebar_label: Query Params
---

# Query Params Type

Query Params are very often untyped, which may cause maintenance problems. However, this is not the case here, and our
query params types can be easily added to the request.

---

### Example

```ts
type QueryParamsType = {
  search?: string;
  role?: "Admin" | "User";
};

const getUsers = client.createRequest<ResponseType, null, null, QueryParamsType>()({
  endpoint: "/users",
});
```
