From 8e9906599bab514eae7b00cae4db95ca182ef3a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Hoffmann?= Date: Thu, 30 Mar 2023 13:50:19 +0200 Subject: [PATCH] feat(dh): add gridAreas root query (#1599) * Add gridAreas root query * style: format --------- Co-authored-by: github-actions[bot] --- .../dh/api-dh/source/DataHub.WebApi/GraphQL/GraphQLQuery.cs | 6 ++++++ libs/dh/shared/domain/src/lib/generated/graphql.ts | 1 + schema.graphql | 1 + 3 files changed, 8 insertions(+) diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/GraphQLQuery.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/GraphQLQuery.cs index b11ecfa3a3..5dd47dc347 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/GraphQLQuery.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/GraphQLQuery.cs @@ -105,6 +105,12 @@ public GraphQLQuery() .WithService() .ResolveAsync(async (context, client) => await client.GetOrganizationAsync(context.GetArgument("id"))); + Field>>>("gridAreas") + .Resolve() + .WithScope() + .WithService() + .ResolveAsync(async (context, client) => await client.GetGridAreasAsync()); + Field("batch") .Argument("id", "The id of the organization") .Resolve() diff --git a/libs/dh/shared/domain/src/lib/generated/graphql.ts b/libs/dh/shared/domain/src/lib/generated/graphql.ts index 5485317ec7..e29db92600 100644 --- a/libs/dh/shared/domain/src/lib/generated/graphql.ts +++ b/libs/dh/shared/domain/src/lib/generated/graphql.ts @@ -91,6 +91,7 @@ export type GraphQlQuery = { actors: Array; batch?: Maybe; batches: Array; + gridAreas: Array; organization?: Maybe; organizations?: Maybe>>; permission: Permission; diff --git a/schema.graphql b/schema.graphql index f77a171a46..03b29673b7 100644 --- a/schema.graphql +++ b/schema.graphql @@ -123,6 +123,7 @@ type GraphQLQuery { id: ID ): Batch batches(executionTime: DateRange): [Batch!]! + gridAreas: [GridArea!]! organization( """ The id of the organization