From 5f4a973e2a56b8f81e7fb3b1da0eebd481d10c13 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Sat, 15 Jul 2023 10:38:35 +0200 Subject: [PATCH] backend allow room filter by id for single rooms --- backend/src/graphql/rooms.ts | 4 ++-- backend/src/schema/types/type/Room.gql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/graphql/rooms.ts b/backend/src/graphql/rooms.ts index 109bf1d55..001c5cdc3 100644 --- a/backend/src/graphql/rooms.ts +++ b/backend/src/graphql/rooms.ts @@ -13,8 +13,8 @@ export const createRoomMutation = () => { export const roomQuery = () => { return gql` - query { - Room { + query Room($first: Int, $offset: Int, $id: ID) { + Room(first: $first, offset: $offset, id: $id) { id roomId roomName diff --git a/backend/src/schema/types/type/Room.gql b/backend/src/schema/types/type/Room.gql index 2ce6556f6..1d056770b 100644 --- a/backend/src/schema/types/type/Room.gql +++ b/backend/src/schema/types/type/Room.gql @@ -24,5 +24,5 @@ type Mutation { } type Query { - Room: [Room] + Room(id: ID): [Room] }