Skip to content

Commit 9314b8d

Browse files
Fixed bug w/ undefined headers, now allowing graphqlQuery to run via EventBrdige
1 parent e025ce9 commit 9314b8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/backend/utils/graphqlQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { event, isStaging } from '.';
22

33
export const graphqlQuery = async ({ query, variables = {} }) => {
44
const authorization = event?.headers?.authorization;
5-
const role = event?.headers['x-hasura-role'];
5+
const role = event?.headers?.['x-hasura-role'];
66
const headers = {
77
'Content-Type': 'application/json',
88
...authorization ? { authorization } : { 'x-hasura-admin-secret': process.env.DB_PASSWORD },

0 commit comments

Comments
 (0)