Files
bodyshop/server/graphql-client/graphql-client.js

10 lines
321 B
JavaScript

const GraphQLClient = require("graphql-request").GraphQLClient;
require("dotenv").config();
//TODO May need to use a different client that includes caching of resources.
exports.client = new GraphQLClient(process.env.GRAPHQL_ENDPOINT, {
headers: {
"x-hasura-admin-secret": process.env.HASURA_ADMIN_SECRET
}
});