How to use the @commercetools-frontend/constants.GRAPHQL_TARGETS.ADMINISTRATION_SERVICE function in @commercetools-frontend/constants

To help you get started, we’ve selected a few @commercetools-frontend/constants 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 commercetools / merchant-center-application-kit / packages / application-shell / src / apollo-links / token-retry-link.spec.js View on Github external
it('should support the `administration` GraphQL target', () => {
    expect(
      getDoesGraphQLTargetSupportTokenRetry({
        'X-Graphql-Target': GRAPHQL_TARGETS.ADMINISTRATION_SERVICE,
      })
    ).toBe(true);
  });
github commercetools / merchant-center-application-kit / packages / application-shell / src / apollo-links / token-retry-link.js View on Github external
export const getDoesGraphQLTargetSupportTokenRetry = requestHeaders =>
  [
    GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM,
    GRAPHQL_TARGETS.ADMINISTRATION_SERVICE,
  ].includes(requestHeaders['X-Graphql-Target']);

@commercetools-frontend/constants

Shared constants for MC applications

MIT
Latest version published 3 days ago

Package Health Score

87 / 100
Full package analysis