2022-07-08 01:42:38 +02:00

10 lines
328 B
TypeScript

import { GraphQLClient } from "graphql-request";
import { getSdk } from "graphql/generated";
export const getReadySdk = (): ReturnType<typeof getSdk> => {
const client = new GraphQLClient(process.env.URL_GRAPHQL ?? "", {
headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` },
});
return getSdk(client);
};