Skip to main content

shopifyApp

Returns a set of functions that can be used by the app's backend to be able to respond to all Shopify requests.

The shape of the returned object changes depending on the value of distribution. If it is AppDistribution.ShopifyAdmin, then only ShopifyAppBase objects are returned, otherwise ShopifyAppLogin objects are included.

Creates an object your app will use to interact with Shopify.

Anchor to appConfig
appConfig
<Config>
required

Configuration options for your Shopify app, such as the scopes your app needs.

<Config extends <Storage, Future>>

ShopifyApp An object constructed using your appConfig. It has methods for interacting with Shopify.

Future flags are used to enable features that are not yet available by default.

Anchor to customerAddressDefaultFix
customerAddressDefaultFix
boolean

Change the CustomerAddress classes to expose a is_default property instead of default when fetching data. This resolves a conflict with the default() method in that class.

Anchor to unstable_managedPricingSupport
unstable_managedPricingSupport
boolean

Enable support for managed pricing, so apps can check for payments without needing a billing config.

Examples

/shopify.server.ts

import { shopifyApp } from "@shopify/shopify-app-remix/server";

const shopify = shopifyApp({
apiKey: process.env.SHOPIFY_API_KEY!,
apiSecretKey: process.env.SHOPIFY_API_SECRET!,
scopes: process.env.SCOPES?.split(",")!,
appUrl: process.env.SHOPIFY_APP_URL!,
});
export default shopify;


Was this page helpful?