From ed107826d8ae5003e0a375f5bd7123e2d7b8f557 Mon Sep 17 00:00:00 2001 From: Theresa Kamerman Date: Wed, 27 Sep 2023 09:11:52 -0700 Subject: [PATCH] Make GQLMerlinService query table instead of deprecated action - remove reference to removed exception --- .../scheduler/server/services/GraphQLMerlinService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scheduler-server/src/main/java/gov/nasa/jpl/aerie/scheduler/server/services/GraphQLMerlinService.java b/scheduler-server/src/main/java/gov/nasa/jpl/aerie/scheduler/server/services/GraphQLMerlinService.java index eb4a9638e4..95cedbad69 100644 --- a/scheduler-server/src/main/java/gov/nasa/jpl/aerie/scheduler/server/services/GraphQLMerlinService.java +++ b/scheduler-server/src/main/java/gov/nasa/jpl/aerie/scheduler/server/services/GraphQLMerlinService.java @@ -717,7 +717,7 @@ public Collection getResourceTypes(final MissionModelId missionMod { final var request = """ query GetResourceTypes { - resourceTypes(missionModelId: "%d") { + resource_type(where: {model_id: {_eq: %d}}) { name schema } @@ -726,7 +726,7 @@ public Collection getResourceTypes(final MissionModelId missionMod final JsonObject response; response = postRequest(request).get(); final var data = response.getJsonObject("data"); - final var resourceTypesJsonArray = data.getJsonArray("resourceTypes"); + final var resourceTypesJsonArray = data.getJsonArray("resource_type"); final var resourceTypes = new ArrayList(); @@ -746,7 +746,6 @@ public Collection getResourceTypes(final MissionModelId missionMod * @param planId the plan id * @return * @throws IOException - * @throws MissionModelServiceException * @throws MerlinServiceException * @throws NoSuchPlanException */