From 9b4d193e92b38bfdd63588546ae997fc9f929b13 Mon Sep 17 00:00:00 2001 From: Robert Eggl Date: Sat, 2 Nov 2024 22:25:54 +0100 Subject: [PATCH] fix(api): adjust GraphQL query syntax to match enum representation --- rogue-thi-app/data/mobility.json | 6 +++--- rogue-thi-app/lib/backend/neuland-api.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rogue-thi-app/data/mobility.json b/rogue-thi-app/data/mobility.json index ad9b059c..397c83bc 100644 --- a/rogue-thi-app/data/mobility.json +++ b/rogue-thi-app/data/mobility.json @@ -47,9 +47,9 @@ "train": { "defaultStation": "nord", "stations": [ - { "id": "nord", "name": "Nordbahnhof" }, - { "id": "hbf", "name": "Hauptbahnhof" }, - { "id": "audi", "name": "Audi" } + { "id": "INGOLSTADT_NORD", "name": "Nordbahnhof" }, + { "id": "NGOLSTADT_HBF", "name": "Hauptbahnhof" }, + { "id": "NGOLSTADT_AUDI", "name": "Audi" } ] }, "parking": [ diff --git a/rogue-thi-app/lib/backend/neuland-api.js b/rogue-thi-app/lib/backend/neuland-api.js index 9cf06df3..bafe21fa 100644 --- a/rogue-thi-app/lib/backend/neuland-api.js +++ b/rogue-thi-app/lib/backend/neuland-api.js @@ -42,7 +42,7 @@ class NeulandAPIClient { return await this.performGraphQLQuery( gql` query { - food(locations: [${locations.map((x) => `"${x}"`).join(',')}]) { + food(locations: [${locations.join(',')}]) { errors { location message @@ -128,7 +128,7 @@ class NeulandAPIClient { return this.performGraphQLQuery( gql` query { - bus(station: "${station}") { + bus(station: ${station}) { route destination time @@ -145,7 +145,7 @@ class NeulandAPIClient { return this.performGraphQLQuery( gql` query { - train(station: "${station}") { + train(station: ${station}) { name destination plannedTime