Skip to main content
Version: 5.x.x

Using 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.

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

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