
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
@nestjs-shopify/graphql
Advanced tools
A NestJS module for exposing a Shopify GraphQL Admin API proxy. The `ShopifyGraphqlProxyModule` allows you to expose the GraphQL Admin API without having to pass in an `X-Shopify-Access-Token`. The module automatically provides everything necessary to cal
A NestJS module for exposing a Shopify GraphQL Admin API proxy. The ShopifyGraphqlProxyModule
allows you to expose the GraphQL Admin API without having to pass in an X-Shopify-Access-Token
. The module automatically provides everything necessary to call the Shopify GraphQL Admin API. Uses @shopify/shopify-api
under the hood.
Install required dependencies and this package using NPM:
npm i @shopify/shopify-api @nestjs-shopify/core @shopify-nestjs/express @nestjs-shopify/auth @nestjs-shopify/graphql
or using Yarn:
yarn add @shopify/shopify-api @nestjs-shopify/core @shopify-nestjs/express @nestjs-shopify/auth @nestjs-shopify/graphql
Note
Install
@nestjs-shopify/express
if you are using Express, or@nestjs-shopify/fastify
if you are using Fastify.
From your application root module, import the ShopifyGraphqlProxyModule
:
// app.module.ts
import { ShopifyAuthModule } from '@nestjs-shopify/auth';
import { ShopifyExpressModule } from '@nestjs-shopify/express';
import { ShopifyGraphqlProxyModule } from '@nestjs-shopify/graphql';
@Module({
imports: [
ShopifyExpressModule.forRoot({
apiKey: 'foo',
apiSecret: 'bar',
apiVersion: ApiVersion.Unstable,
hostName: 'localhost:8081',
isEmbeddedApp: true,
scopes: ['test_scope'],
}),
ShopifyAuthModule.forRootOnline({
basePath: 'user',
returnHeaders: true,
}),
ShopifyGraphqlProxyModule,
],
})
export class AppModule {}
This will expose the /graphql
endpoint.
Make sure to setup online session authentication using ShopifyAuthModule
with forRootOnline
or forRootAsyncOnline
. The Admin GraphQL API proxy only works with online session tokens. Not with offline tokens.
FAQs
A NestJS module for exposing a Shopify GraphQL Admin API proxy. The `ShopifyGraphqlProxyModule` allows you to expose the GraphQL Admin API without having to pass in an `X-Shopify-Access-Token`. The module automatically provides everything necessary to cal
The npm package @nestjs-shopify/graphql receives a total of 1,026 weekly downloads. As such, @nestjs-shopify/graphql popularity was classified as popular.
We found that @nestjs-shopify/graphql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.