export const queryGql = async ({
  endPoint,
  apiKey,
  query,
}: {
  endPoint: string;
  apiKey: string;
  query: string;
}) =>
  fetch(endPoint, {
    method: 'POST',
    headers: {
      'x-api-key': apiKey,
      'Content-Type': 'application/json',
      Accept: 'application/json',
    },
    body: JSON.stringify({ query }),
  }).then((response) => response.json());
