Skip to content
Compare
Choose a tag to compare
@shopify-github-actions-access shopify-github-actions-access released this 25 Sep 13:25
· 4416 commits to main since this release
903589e

Minor Changes

  • 6ac6832: Added the storefront GraphQL client.

    The storefront API client can be accessed in two ways

    App Proxy
    import {json} from '@remix-run/node';
    import {authenticate} from '~/shopify.server';
    
    export async function loader({request}) {
      const {storefront} = await authenticate.public.appProxy(request);
      const response = await storefront.graphql('{blogs(first: 10) {nodes{id}}}');
    
      return json(await response.json());
    }
    Unauthenticated Storefront
    import {json} from '@remix-run/node';
    import {unauthenticated} from '~/shopify.server';
    import {customAuthenticateRequest} from '~/helpers';
    
    export async function loader({request}) {
      await customAuthenticateRequest(request);
    
      const {storefront} = await unauthenticated.storefront(
        'my-shop.myshopify.com',
      );
      const response = await storefront.graphql('{blogs(first: 10) {nodes{id}}}');
    
      return json(await response.json());
    }

Patch Changes

  • 64fe70b: Allow all billing config overrides at request time.

    Override billing configs when calling request
    import {json} from '@remix-run/node';
    import {authenticate} from '~/shopify.server';
    
    export async function loader({request}) {
      const {billing} = await authenticate.admin(request);
    
      await billing.require({
        plans: ['plan1', 'plan2'],
        onFailure: async () =>
          await billing.request({
            plan: 'plan1',
            trialDays: 5, // Override the trialDays config value
          }),
      });
    
      return json(await response.json());
    }
  • 616388d: Updating dependency on @shopify/shopify-api to 7.7.0

  • Updated dependencies [616388d]