From ac19b43059b2d0d4a500697888d14e76037877fe Mon Sep 17 00:00:00 2001 From: Kshitij Date: Sun, 8 Dec 2024 14:44:30 +0530 Subject: [PATCH] Changed query structure. --- .../platform/graphql/builder/EventBuilder.java | 1 + .../platform/graphql/type/Player.java | 17 +++++++++-------- .../src/main/resources/graphql/schema.graphqls | 1 + 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/platform/src/main/java/com/flickmatch/platform/graphql/builder/EventBuilder.java b/platform/src/main/java/com/flickmatch/platform/graphql/builder/EventBuilder.java index 2c8a8c2e..9153f8b1 100644 --- a/platform/src/main/java/com/flickmatch/platform/graphql/builder/EventBuilder.java +++ b/platform/src/main/java/com/flickmatch/platform/graphql/builder/EventBuilder.java @@ -363,6 +363,7 @@ private void createPlayerQueue(Event.EventDetails eventDetails, eventDetails.getPlayerDetailsList().forEach(playerDetails -> { Player player = Player.builder() .displayName(playerDetails.getName()) + .teamColor(playerDetails.getTeamColor()) .build(); if (counter.get() < eventDetails.getReservedPlayersCount()) { reservedPlayers.add(player); diff --git a/platform/src/main/java/com/flickmatch/platform/graphql/type/Player.java b/platform/src/main/java/com/flickmatch/platform/graphql/type/Player.java index e32cab01..5956afc5 100644 --- a/platform/src/main/java/com/flickmatch/platform/graphql/type/Player.java +++ b/platform/src/main/java/com/flickmatch/platform/graphql/type/Player.java @@ -1,8 +1,9 @@ -package com.flickmatch.platform.graphql.type; - -import lombok.Builder; - -@Builder -public class Player { - String displayName; -} +package com.flickmatch.platform.graphql.type; + +import lombok.Builder; + +@Builder +public class Player { + String displayName; + String teamColor; +} diff --git a/platform/src/main/resources/graphql/schema.graphqls b/platform/src/main/resources/graphql/schema.graphqls index 270717dc..fa47d4e2 100644 --- a/platform/src/main/resources/graphql/schema.graphqls +++ b/platform/src/main/resources/graphql/schema.graphqls @@ -256,6 +256,7 @@ type EVENT { type Player { displayName: String! + teamColor: String } type SportsVenue {