createAdminApiClient()
Creates a GraphQL client for the Shopify Admin API.Parameters
string
required
The Shopify store domain (e.g.,
my-store.myshopify.com)string
required
The Admin API version to use (e.g.,
2025-10)string
required
Admin API access token for authentication
string
Optional prefix to add to the User-Agent header
number
default:"0"
Number of retry attempts for failed requests
CustomFetchApi
Custom fetch implementation (defaults to global
fetch)ApiClientLogger
Logger function for debugging and monitoring requests
boolean
Set to
true to skip server-side usage validation during testingReturns
object
Admin API client instance with the following properties:
Client Methods
fetch()
Executes a GraphQL operation and returns the raw response.string
required
GraphQL query or mutation string
object
Request options:
variables: GraphQL variables objectheaders: Additional headers to merge with defaultsapiVersion: Override the default API versionretries: Override the default retry countsignal: AbortSignal for request cancellation
request()
Executes a GraphQL operation and returns parsed response data.ClientResponse<TData> object:
TData
The GraphQL response data
ResponseErrors
Error information if the request failed:
networkStatusCode: HTTP status codemessage: Error messagegraphQLErrors: Array of GraphQL errorsresponse: Raw Response object
object
GraphQL extensions from the response
Headers
Response headers