---
sidebar_position: 2
title: Using graphql-tag
sidebar_label: Graphql-tag
---

## graphql-tag

You can use tagging libraries, as we use the graphql `print` method to make sure the query is transformed to a string.

```ts
const getUser = client.createRequest<Tea[]>()({
  endpoint: gql`
    query GetUser {
      username {
        username
        firstName
      }
    }
  `,
});

const { data, status, extra, success, error } = await getUser.send();
```
