From 510f7fc4d7cfad2782a78968c2cf8effe523700d Mon Sep 17 00:00:00 2001 From: Samuel Andert Date: Wed, 23 Aug 2023 15:21:20 +0200 Subject: [PATCH] temporary state --- .meshrc.yml | 8 ++++---- src/fetch-schema.js | 2 +- .../{directus_subscriptions.js => subs_directus.js} | 2 +- {public => src}/schemas/cloudron.json | 0 {public => src}/schemas/directus.graphql | 0 {public => src}/schemas/gitea.yml | 0 {public => src}/schemas/gridproxy.json | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename src/resolvers/{directus_subscriptions.js => subs_directus.js} (97%) rename {public => src}/schemas/cloudron.json (100%) rename {public => src}/schemas/directus.graphql (100%) rename {public => src}/schemas/gitea.yml (100%) rename {public => src}/schemas/gridproxy.json (100%) diff --git a/.meshrc.yml b/.meshrc.yml index cf4a929..dcff1f2 100644 --- a/.meshrc.yml +++ b/.meshrc.yml @@ -6,23 +6,23 @@ sources: handler: graphql: endpoint: https://directus.andert.me/graphql - source: ./public/schemas/directus.graphql + source: ./src/schemas/directus.graphql operationHeaders: Authorization: Bearer {env.DIRECTUS_API} additionalResolvers: - - ./src/resolvers/directus_subscriptions.js + - ./src/resolvers/subs_directus.js # - name: Cloudron # handler: # openapi: # endpoint: https://my.andert.me/api/v1 - # source: ./public/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: ./public/schemas/gitea.yml + # source: ./src/schemas/gitea.yml # operationHeaders: # Authorization: Bearer {env.GITEA_API} diff --git a/src/fetch-schema.js b/src/fetch-schema.js index 0fb368b..68bf292 100644 --- a/src/fetch-schema.js +++ b/src/fetch-schema.js @@ -24,7 +24,7 @@ async function fetchSchema() { }); // Save the schema to a file - fs.writeFileSync('./public/schemas/directus.graphql', schema); + fs.writeFileSync('./src/schemas/directus.graphql', schema); } fetchSchema().catch(console.error); diff --git a/src/resolvers/directus_subscriptions.js b/src/resolvers/subs_directus.js similarity index 97% rename from src/resolvers/directus_subscriptions.js rename to src/resolvers/subs_directus.js index efe9ebf..8192ea7 100644 --- a/src/resolvers/directus_subscriptions.js +++ b/src/resolvers/subs_directus.js @@ -8,7 +8,7 @@ const path = require('path') const pubsub = new PubSub(); // Generate an absolute path to the schema file -const schemaFilePath = path.resolve(process.cwd(), 'public/schemas/directus.graphql'); +const schemaFilePath = path.resolve(process.cwd(), 'src/schemas/directus.graphql'); // Read the schema file const schema = fs.readFileSync(schemaFilePath, 'utf8'); diff --git a/public/schemas/cloudron.json b/src/schemas/cloudron.json similarity index 100% rename from public/schemas/cloudron.json rename to src/schemas/cloudron.json diff --git a/public/schemas/directus.graphql b/src/schemas/directus.graphql similarity index 100% rename from public/schemas/directus.graphql rename to src/schemas/directus.graphql diff --git a/public/schemas/gitea.yml b/src/schemas/gitea.yml similarity index 100% rename from public/schemas/gitea.yml rename to src/schemas/gitea.yml diff --git a/public/schemas/gridproxy.json b/src/schemas/gridproxy.json similarity index 100% rename from public/schemas/gridproxy.json rename to src/schemas/gridproxy.json