Skip to main content

Utilities

gql

The gql template literal tag can be used to concisely write a GraphQL query that is parsed into a standard GraphQL AST. The result can be passed into a GraphQL client.

import { gql } from "@instantcommerce/sdk";

const query = gql`
{
user(id: 5) {
firstName
lastName
}
}
`;