prod path deploy fix test
This commit is contained in:
parent
adb8ee1172
commit
bf8a05c5e8
@ -6,7 +6,7 @@ sources:
|
||||
handler:
|
||||
graphql:
|
||||
endpoint: https://directus.andert.me/graphql
|
||||
source: schemas/directus.graphql
|
||||
source: ./src/schemas/directus.graphql
|
||||
operationHeaders:
|
||||
Authorization: Bearer {env.DIRECTUS_API}
|
||||
additionalResolvers:
|
||||
|
@ -10,7 +10,6 @@ const resolveUserFn = async (context: any) => {
|
||||
const authHeader = context.req.headers.authorization;
|
||||
const authtoken = process.env.GRAPHQL_MESH
|
||||
if (authHeader !== authtoken) {
|
||||
console.error('Failed to validate token')
|
||||
return null
|
||||
}
|
||||
return { id: 'user1' };
|
||||
|
@ -24,7 +24,7 @@ async function fetchSchema() {
|
||||
});
|
||||
|
||||
// Save the schema to a file
|
||||
fs.writeFileSync('./schemas/directus.graphql', schema);
|
||||
fs.writeFileSync('./src/schemas/directus.graphql', schema);
|
||||
}
|
||||
|
||||
fetchSchema().catch(console.error);
|
||||
|
@ -7,7 +7,7 @@ const fs = require('fs');
|
||||
const pubsub = new PubSub();
|
||||
|
||||
// Read the schema file
|
||||
const schema = fs.readFileSync('./schemas/directus.graphql', 'utf8');
|
||||
const schema = fs.readFileSync('./src/schemas/directus.graphql', 'utf8');
|
||||
|
||||
// Parse the schema
|
||||
const document = parse(schema);
|
||||
|
Reference in New Issue
Block a user