try next deploy fix

This commit is contained in:
Samuel Andert 2023-08-23 14:01:52 +02:00
parent bf8a05c5e8
commit e11cf13caa
4 changed files with 33 additions and 3 deletions

View File

@ -16,13 +16,13 @@ additionalResolvers:
# handler:
# openapi:
# endpoint: https://my.andert.me/api/v1
# source: schemas/cloudron.json
# source: ./src/schemas/cloudron.json
# operationHeaders:
# Authorization: Bearer {env.CLOUDRON_API}
# - name: Gitea
# handler:
# openapi:
# endpoint: https://git.andert.me/api/v1
# source: schemas/gitea.yml
# source: ./src/schemas/gitea.yml
# operationHeaders:
# Authorization: Bearer {env.GITEA_API}

View File

@ -37,6 +37,7 @@
"graphql-ws": "^5.14.0",
"next": "13.4.9",
"node-fetch": "^3.3.2",
"path": "^0.12.7",
"postcss": "8.4.25",
"react": "18.2.0",
"react-dom": "18.2.0",

View File

@ -70,6 +70,9 @@ dependencies:
node-fetch:
specifier: ^3.3.2
version: 3.3.2
path:
specifier: ^0.12.7
version: 0.12.7
postcss:
specifier: 8.4.25
version: 8.4.25
@ -5851,6 +5854,10 @@ packages:
wrappy: 1.0.2
dev: false
/inherits@2.0.3:
resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==}
dev: false
/inherits@2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
dev: false
@ -7526,6 +7533,13 @@ packages:
engines: {node: '>=8'}
dev: false
/path@0.12.7:
resolution: {integrity: sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==}
dependencies:
process: 0.11.10
util: 0.10.4
dev: false
/picocolors@1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
dev: false
@ -7664,6 +7678,11 @@ packages:
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
dev: false
/process@0.11.10:
resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==}
engines: {node: '>= 0.6.0'}
dev: false
/promise@7.3.1:
resolution: {integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==}
dependencies:
@ -8895,6 +8914,12 @@ packages:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
dev: false
/util@0.10.4:
resolution: {integrity: sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==}
dependencies:
inherits: 2.0.3
dev: false
/utils-merge@1.0.1:
resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==}
engines: {node: '>= 0.4.0'}

View File

@ -3,11 +3,15 @@ const WebSocket = require('ws');
const { PubSub } = require('graphql-subscriptions');
const { parse } = require('graphql');
const fs = require('fs');
const path = require('path')
const pubsub = new PubSub();
// Generate an absolute path to the schema file
const schemaFilePath = path.resolve(process.cwd(), 'src/schemas/directus.graphql');
// Read the schema file
const schema = fs.readFileSync('./src/schemas/directus.graphql', 'utf8');
const schema = fs.readFileSync(schemaFilePath, 'utf8');
// Parse the schema
const document = parse(schema);