Configure the client
import { GraphQLClient } from "graphql-request";
import { getSdk } from "../graphqlSDKGenerator/graphqlSDKGenerator";
const initializeSDK = () => {
const client = new GraphQLClient(
"https://your-end-point/",
{
headers: {
Authorization: 'Bearer xxx',
},
}
);
return getSdk(client);
};
const main = async () => {
const sdkInstance = initializeSDK();
};
main();
Custom logger
Pass dynamic headers at runtime
Last updated