import { cacheExchange, createClient as urqlCreateClient, fetchExchange } from "urql";

export const createClient = (url: string, getAuth: () => Promise<{ token: string }>) =>
  urqlCreateClient({
    url,
    exchanges: [
      cacheExchange,
      fetchExchange,
    ],
  });
