Aadarsha
09/12/2020, 3:59 PMDonald Wu
09/12/2020, 4:00 PMDonald Wu
09/12/2020, 4:00 PMAadarsha
09/12/2020, 4:01 PMAadarsha
09/12/2020, 4:01 PMAadarsha
09/12/2020, 4:02 PMDonald Wu
09/12/2020, 4:03 PMAadarsha
09/12/2020, 4:04 PMDonald Wu
09/12/2020, 4:05 PMRidwan Sameer
09/12/2020, 4:09 PMAadarsha
09/12/2020, 4:12 PMRidwan Sameer
09/12/2020, 4:14 PMAadarsha
09/12/2020, 4:19 PMRidwan Sameer
09/12/2020, 4:25 PMAadarsha
09/12/2020, 4:34 PMRilwan Yusuf
09/12/2020, 6:12 PMRidwan Sameer
09/12/2020, 6:39 PMMarvin
09/12/2020, 6:40 PMRidwan Sameer
09/12/2020, 6:42 PMMarvin
09/12/2020, 6:44 PMRidwan Sameer
09/12/2020, 6:44 PMMarvin
09/12/2020, 6:45 PMRidwan Sameer
09/12/2020, 6:45 PMMarvin
09/12/2020, 6:45 PMRidwan Sameer
09/12/2020, 6:45 PMMarvin
09/12/2020, 6:45 PMRidwan Sameer
09/12/2020, 6:45 PMMarvin
09/12/2020, 6:46 PMfondfolio
09/12/2020, 11:33 PMPrismaClientUnknownRequestError
on any Prisma operation for create
(update
and delete
work). We’re on Heroku Postgres and use a staging database for these Preview deploys. We aren't sure what part of the stack is producing this error. Could it be something with the how the domain is randomly generated for these deploys and not our main domain? Everything works as expected locally. Longer error in threadChris
09/13/2020, 12:01 AMconst request = require('graphql-request');
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
exports.processSignUp = functions.auth.user().onCreate(async (user) => {
const client = new request.GraphQLClient('GRAPHQL_ENDPOINT_URL', {
headers: {
'content-type': 'application/json',
'x-admin-secret': 'GRAPHQL_ADMIN_SECRET',
},
});
const mutation = `Mutation goes here...`;
const data = await client.request(mutation, { Variables go here... });
return data;
});
When I run this, I get the following error:
ReferenceError: Headers is not defined
at resolveHeaders (/workspace/node_modules/graphql-request/dist/index.js:74:32)
at GraphQLClient.<anonymous> (/workspace/node_modules/graphql-request/dist/index.js:135:35)
at step (/workspace/node_modules/graphql-request/dist/index.js:44:23)
at Object.next (/workspace/node_modules/graphql-request/dist/index.js:25:53)
Any help is much appreciated!