Choosing a Package
The Shopify App JavaScript SDK is organized as a monorepo with multiple packages. This guide will help you choose the right packages for your needs.Quick Decision Tree
Do you already have access tokens?
Yes → Use the API Client packagesNo → You need the App Building packages to handle OAuth
Which API do you need?
- Admin API →
@shopify/admin-api-client - Storefront API →
@shopify/storefront-api-client - Both or custom →
@shopify/graphql-client
API Clients
These packages are lightweight clients for interacting with Shopify’s APIs. Use these when you:- Already have access tokens (from a custom app or OAuth flow)
- Want minimal dependencies and framework-agnostic code
- Need to make API requests without full app infrastructure
@shopify/admin-api-client
Best for: Interacting with the Admin API (both GraphQL and REST)- GraphQL and REST API support
- Automatic retry handling for 429 and 503 responses
- Built-in type definitions
- Configurable logging for debugging
- Querying products, orders, customers
- Managing inventory and fulfillments
- Creating and updating store resources
- Admin app backends
@shopify/storefront-api-client
Best for: Building customer-facing features with the Storefront API- GraphQL Storefront API support
- Support for
@deferdirective and streaming responses - Public and private access token support
- CDN delivery for browser usage
- Custom storefronts and headless commerce
- Product catalogs and collections
- Shopping cart management
- Customer account integration
@shopify/graphql-client
Best for: Generic GraphQL client for any Shopify API or custom needs- Works with any GraphQL API
- Full control over URL and headers
- Stream response support
- Runtime-agnostic (Node.js, browser, edge)
- Multiple API access in one app
- Custom authentication requirements
- Non-standard Shopify APIs
- Testing and development
@shopify/api-codegen-preset
Best for: Adding TypeScript type safety to your GraphQL queries- Automatic type generation from GraphQL operations
- Integrates with
graphql-codegen - Support for all Shopify APIs
- Watch mode for development
- TypeScript projects requiring type safety
- Large codebases with many queries
- Teams wanting autocomplete and validation
- Preventing runtime type errors
App Building
These packages help you build complete Shopify apps with OAuth, webhooks, session management, and more.@shopify/shopify-api
Best for: Framework-agnostic Shopify app infrastructure- OAuth authentication flow
- Webhook registration and processing
- Session management
- REST resources and GraphQL clients
- Billing API integration
- Runtime adapters (Node.js, Cloudflare Workers, Web API)
- Building apps with any framework
- Custom server implementations
- Serverless and edge deployments
- Apps requiring full control over architecture
- Manual route setup
- Session storage implementation
- Webhook handler configuration
@shopify/shopify-app-express
Best for: Express.js apps with middleware and route handlers- Express middleware for authentication
- Pre-built OAuth routes
- Webhook processing middleware
- Session token validation
- Built on top of
@shopify/shopify-api
- Express.js applications
- Traditional server-rendered apps
- Apps with existing Express infrastructure
- Quick prototypes and MVPs
@shopify/shopify-app-remix
Best for: Remix framework applications- Remix loader and action utilities
- Automatic OAuth handling
- Session management with Remix sessions
- TypeScript-first development
- Built on top of
@shopify/shopify-api
- Modern Remix applications
- Full-stack TypeScript apps
- Apps using Shopify’s official templates
- Progressive enhancement patterns
Session Storage
When building a full Shopify app, you need to store sessions. Choose a storage adapter based on your database:Database Adapters
PostgreSQL
@shopify/shopify-app-session-storage-postgresqlMySQL
@shopify/shopify-app-session-storage-mysqlMongoDB
@shopify/shopify-app-session-storage-mongodbRedis
@shopify/shopify-app-session-storage-redisSQLite
@shopify/shopify-app-session-storage-sqliteDynamoDB
@shopify/shopify-app-session-storage-dynamodbCloudflare KV
@shopify/shopify-app-session-storage-kvMemory (Dev Only)
@shopify/shopify-app-session-storage-memoryORM Adapters
Prisma
@shopify/shopify-app-session-storage-prismaDrizzle
@shopify/shopify-app-session-storage-drizzleCommon Combinations
Simple API Integration
Type-Safe API Client
Full Express App
Headless Storefront
Still Not Sure?
Try the Quickstart
Start with the Admin API Client and expand from there
View Examples
See real-world code examples for different use cases
Ask the Community
Get help from other developers
Read the Guides
Deep dive into OAuth, webhooks, and more