fixing vercel deploy
This commit is contained in:
parent
f24e9980f3
commit
91ce34e260
@ -6,7 +6,7 @@ sources:
|
|||||||
handler:
|
handler:
|
||||||
graphql:
|
graphql:
|
||||||
endpoint: https://directus.andert.me/graphql
|
endpoint: https://directus.andert.me/graphql
|
||||||
source: ./public/schemas/directus.graphql
|
source: ./src/schemas/directus.graphql
|
||||||
operationHeaders:
|
operationHeaders:
|
||||||
Authorization: Bearer {env.DIRECTUS_API}
|
Authorization: Bearer {env.DIRECTUS_API}
|
||||||
additionalResolvers:
|
additionalResolvers:
|
||||||
@ -16,13 +16,13 @@ additionalResolvers:
|
|||||||
# handler:
|
# handler:
|
||||||
# openapi:
|
# openapi:
|
||||||
# endpoint: https://my.andert.me/api/v1
|
# endpoint: https://my.andert.me/api/v1
|
||||||
# source: ./public/schemas/cloudron.json
|
# source: ./src/schemas/cloudron.json
|
||||||
# operationHeaders:
|
# operationHeaders:
|
||||||
# Authorization: Bearer {env.CLOUDRON_API}
|
# Authorization: Bearer {env.CLOUDRON_API}
|
||||||
# - name: Gitea
|
# - name: Gitea
|
||||||
# handler:
|
# handler:
|
||||||
# openapi:
|
# openapi:
|
||||||
# endpoint: https://git.andert.me/api/v1
|
# endpoint: https://git.andert.me/api/v1
|
||||||
# source: ./public/schemas/gitea.yml
|
# source: ./src/schemas/gitea.yml
|
||||||
# operationHeaders:
|
# operationHeaders:
|
||||||
# Authorization: Bearer {env.GITEA_API}
|
# Authorization: Bearer {env.GITEA_API}
|
||||||
|
@ -24,7 +24,7 @@ async function fetchSchema() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Save the schema to a file
|
// Save the schema to a file
|
||||||
fs.writeFileSync('./public/schemas/directus.graphql', schema);
|
fs.writeFileSync('./src/schemas/directus.graphql', schema);
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchSchema().catch(console.error);
|
fetchSchema().catch(console.error);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,22 +2,10 @@ const { createClient } = require('graphql-ws');
|
|||||||
const WebSocket = require('ws');
|
const WebSocket = require('ws');
|
||||||
const { PubSub } = require('graphql-subscriptions');
|
const { PubSub } = require('graphql-subscriptions');
|
||||||
const { parse } = require('graphql');
|
const { parse } = require('graphql');
|
||||||
const fs = require('fs');
|
|
||||||
const path = require('path')
|
|
||||||
|
|
||||||
const pubsub = new PubSub();
|
const pubsub = new PubSub();
|
||||||
|
|
||||||
// let schemaFilePath;
|
const schema = require('raw-loader!../schemas/directus.graphql').default;
|
||||||
// if (process.env.NODE_ENV === 'production') {
|
|
||||||
// schemaFilePath = path.resolve(process.cwd(), 'schemas/directus.graphql');
|
|
||||||
// } else {
|
|
||||||
// schemaFilePath = path.resolve(process.cwd(), 'public/schemas/directus.graphql');
|
|
||||||
// }
|
|
||||||
|
|
||||||
const schema = require('raw-loader!./directus.graphql').default;
|
|
||||||
|
|
||||||
// Read the schema file
|
|
||||||
// const schema = fs.readFileSync(schemaFilePath, 'utf8');
|
|
||||||
|
|
||||||
// Parse the schema
|
// Parse the schema
|
||||||
const document = parse(schema);
|
const document = parse(schema);
|
||||||
|
Reference in New Issue
Block a user