How to use the @shopify/koa-shopify-graphql-proxy.ApiVersion.October19 function in @shopify/koa-shopify-graphql-proxy

To help you get started, we’ve selected a few @shopify/koa-shopify-graphql-proxy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Shopify / shopify-demo-app-node-react / server.js View on Github external
async afterAuth(ctx) {
        const { shop, accessToken } = ctx.session;
        ctx.cookies.set("shopOrigin", shop, { httpOnly: false });

        const registration = await registerWebhook({
          address: `${HOST}/webhooks/products/create`,
          topic: 'PRODUCTS_CREATE',
          accessToken,
          shop,
          apiVersion: ApiVersion.October19
        });

        if (registration.success) {
          console.log('Successfully registered webhook!');
        } else {
          console.log('Failed to register webhook', registration.result);
        }
        await getSubscriptionUrl(ctx, accessToken, shop);
      }
    })

@shopify/koa-shopify-graphql-proxy

A wrapper around `koa-better-http-proxy` which allows easy proxying of GraphQL requests from an embedded Shopify app

MIT
Latest version published 6 days ago

Package Health Score

88 / 100
Full package analysis

Similar packages