ResolverContext

Learn about the Shopify context your resolvers read from.

This type describes the Shopify context passed to the identity resolver and locale resolver. It is available on both the React Router 7 and Remix setups.

Definition

The type has the following shape:

type ResolverContext = {  env: unknown,  customerAccount: {    isLoggedIn: () => Promise<boolean>,    query: (query: string) => Promise<{data?: unknown}>,  },  storefront: {    i18n: {language: string, country: string},  },};

Properties

The following list describes the properties:

env
unknown

The Oxygen environment bindings for the current request.

customerAccount
object

The Shopify Customer Account API client, used to read the logged-in customer.

storefront
object

The Shopify Storefront API client, whose i18n configuration carries the storefront language and country.