prod path deploy fix test

This commit is contained in:
Samuel Andert 2023-08-23 13:29:29 +02:00
parent adb8ee1172
commit bf8a05c5e8
8 changed files with 3 additions and 4 deletions

View File

@ -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:

View File

@ -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' };

View File

@ -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);

View File

@ -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);