graphql-client/types.ts

shopify-api-js · packages/graphql-client/src/graphql-client/types.ts · typescript · MIT
integration, Integration / API

types.ts from Shopify/shopify-api-js

// Source: https://github.com/Shopify/shopify-api-js | License: MIT | Copyright 2020-present, Shopify Inc
// Provided via justclaw.it.com; keep this notice with the code.
export type CustomFetchApi = (
  url: string,
  init?: {
    method?: string;
    headers?: HeadersInit;
    body?: string;
  },
) => Promise<Response>;

type OperationVariables = Record<string, any>;

export type DataChunk = Buffer | Uint8Array;

export type Headers = Record<string, string | string[]>;

export interface ResponseErrors {
  networkStatusCode?: number;
  message?: string;
  graphQLErrors?: any[];
  response?: Response;
}

export type GQLExtensions = Record<string, any>;

export interface FetchResponseBody<TData = any> {
  data?: TData;
  extensions?: GQLExtensions;
}

export interface ClientResponse<TData =

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key