Skip to content

Instantly share code, notes, and snippets.

@shark-h
Created September 4, 2019 10:24
Show Gist options
  • Save shark-h/597325b487e82e2ec7cf66c3a5916f1b to your computer and use it in GitHub Desktop.
Save shark-h/597325b487e82e2ec7cf66c3a5916f1b to your computer and use it in GitHub Desktop.
const functions = require("firebase-functions");
const admin = require("firebase-admin");
const request = require("graphql-request");
const client = new request.GraphQLClient('<your-graphql-endpoint>', {
headers: {
"content-type": "application/json",
"x-hasura-admin-secret": "<your-admin-secret>"
}
})
admin.initializeApp(functions.config().firebase);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment