aboutsummaryrefslogtreecommitdiffstats
path: root/tests/msw/instances/index.ts
blob: 82218c327ee81580cb6cc16f4723fc71f039f913 (plain)
1
2
3
4
5
6
7
8
9
10
import { graphql } from 'msw';
import { GITHUB_API } from '../../../src/utils/constants';

const wordpressGraphQLUrl = process.env.NEXT_PUBLIC_STAGING_GRAPHQL_API;

if (!wordpressGraphQLUrl)
  throw new Error('You forgot to define an URL for the WordPress GraphQL API');

export const githubAPI = graphql.link(GITHUB_API);
export const wordpressAPI = graphql.link(wordpressGraphQLUrl);