From 2063f4173aef0e9f8a545b7bcc483e7bb84ccff8 Mon Sep 17 00:00:00 2001 From: Jarrod Lowe <41766555+jarrod-lowe@users.noreply.github.com> Date: Sat, 7 Sep 2024 20:31:24 +1200 Subject: [PATCH] Remove publicNotes (#77) --- appsync/graphql.ts | 1 - appsync/schema.ts | 6 +++--- design/PLANNING.md | 14 +++----------- graphql/function/fnGetGame/appsync.ts | 1 - graphql/schema.graphql | 1 - graphql/tests/fnGetGame.test.ts | 13 ++----------- 6 files changed, 8 insertions(+), 28 deletions(-) diff --git a/appsync/graphql.ts b/appsync/graphql.ts index 0f70040c..b70e0af5 100644 --- a/appsync/graphql.ts +++ b/appsync/graphql.ts @@ -35,7 +35,6 @@ export type Game = { gameName: Scalars['String']['output']; joinToken?: Maybe; playerSheets: Array; - publicNotes?: Maybe; type: Scalars['String']['output']; updatedAt: Scalars['AWSDateTime']['output']; }; diff --git a/appsync/schema.ts b/appsync/schema.ts index 3d258bee..10a2a982 100644 --- a/appsync/schema.ts +++ b/appsync/schema.ts @@ -3,7 +3,7 @@ export const getGameQuery = ` query getGame($id: ID!) { getGame(id: $id) { - gameId gameName gameDescription publicNotes playerSheets { userId gameId characterName sections { userId gameId type createdAt updatedAt } type createdAt updatedAt } joinToken createdAt updatedAt type + gameId gameName gameDescription playerSheets { userId gameId characterName sections { userId gameId type createdAt updatedAt } type createdAt updatedAt } joinToken createdAt updatedAt type } } `; @@ -21,7 +21,7 @@ export const createGameMutation = ` mutation createGame($input: CreateGameInput!) { createGame(input: $input) { - gameId gameName gameDescription publicNotes playerSheets { userId gameId characterName sections { userId gameId type createdAt updatedAt } type createdAt updatedAt } joinToken createdAt updatedAt type + gameId gameName gameDescription playerSheets { userId gameId characterName sections { userId gameId type createdAt updatedAt } type createdAt updatedAt } joinToken createdAt updatedAt type } } `; @@ -29,7 +29,7 @@ export const joinGameMutation = ` mutation joinGame($input: JoinGameInput!) { joinGame(input: $input) { - gameId gameName gameDescription publicNotes playerSheets { userId gameId characterName sections { userId gameId type createdAt updatedAt } type createdAt updatedAt } joinToken createdAt updatedAt type + gameId gameName gameDescription playerSheets { userId gameId characterName sections { userId gameId type createdAt updatedAt } type createdAt updatedAt } joinToken createdAt updatedAt type } } `; diff --git a/design/PLANNING.md b/design/PLANNING.md index a52f02b5..70b9e482 100644 --- a/design/PLANNING.md +++ b/design/PLANNING.md @@ -297,7 +297,7 @@ Assistant: * `PK`: `GAME#` * `SK`: `METADATA` * `gameId`: gameId - * Other fields: `gameName`, `gameDescription`, `publicNotes`, `fireflyUserId`, `createdAt`, `updatedAt`, `GSI1PK` + * Other fields: `gameName`, `gameDescription`, `fireflyUserId`, `createdAt`, `updatedAt`, `GSI1PK` 1. **GM Info** * `PK`: `GAME#` @@ -353,7 +353,8 @@ Assistant: 1. **Ship Sheet** * `PK`: `GAME#` * `SK`: `SHIP#` - * `name` (String) + * `characterName` (String) + * Each section is one of: (TODO: Modify) * `publicNotes` (String) * `gmNotes` (String) * `conditions` (List of Strings) @@ -509,7 +510,6 @@ input UpdateUserInput { input CreateGameInput { name: String! description: String - publicNotes: String privateNotes: String fireflyUserId: ID! players: [ID!]! @@ -518,7 +518,6 @@ input CreateGameInput { input UpdateGameInput { name: String description: String - publicNotes: String privateNotes: String players: [ID!] } @@ -531,7 +530,6 @@ input CreatePlayerSheetInput { bloodline: String origin: String post: String - publicNotes: String privateNotes: String secretNotes: String fireflyNotes: String @@ -543,7 +541,6 @@ input UpdatePlayerSheetInput { bloodline: String origin: String post: String - publicNotes: String privateNotes: String secretNotes: String fireflyNotes: String @@ -552,7 +549,6 @@ input UpdatePlayerSheetInput { input CreateShipSheetInput { gameId: ID! name: String! - publicNotes: String gmNotes: String conditions: [String!]! stakesUsed: Int! @@ -561,7 +557,6 @@ input CreateShipSheetInput { input UpdateShipSheetInput { name: String - publicNotes: String gmNotes: String conditions: [String!] stakesUsed: Int @@ -601,7 +596,6 @@ type Game { id: ID! name: String! description: String - publicNotes: String privateNotes: String fireflyUser: User! players: [ID!]! @@ -622,7 +616,6 @@ type PlayerSheet { bloodline: String origin: String post: String - publicNotes: String privateNotes: String secretNotes: String fireflyNotes: String @@ -691,7 +684,6 @@ type ShipSheet { id: ID! game: Game! name: String! - publicNotes: String gmNotes: String conditions: [String!]! stakesUsed: Int! diff --git a/graphql/function/fnGetGame/appsync.ts b/graphql/function/fnGetGame/appsync.ts index 13d5740b..ccf5eca4 100644 --- a/graphql/function/fnGetGame/appsync.ts +++ b/graphql/function/fnGetGame/appsync.ts @@ -141,7 +141,6 @@ export function makeGameData(data: DataGame, sub: string): Game { gameId: data.gameId, gameName: data.gameName, gameDescription: data.gameDescription, - publicNotes: data.publicNotes, playerSheets: [], joinToken: joinToken, createdAt: data.createdAt, diff --git a/graphql/schema.graphql b/graphql/schema.graphql index ba07db3b..cb813c4e 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -40,7 +40,6 @@ type Game @aws_cognito_user_pools { gameId: ID! gameName: String! gameDescription: String - publicNotes: String playerSheets: [PlayerSheet!]! joinToken: String createdAt: AWSDateTime! diff --git a/graphql/tests/fnGetGame.test.ts b/graphql/tests/fnGetGame.test.ts index dd54ad46..f505f4c4 100644 --- a/graphql/tests/fnGetGame.test.ts +++ b/graphql/tests/fnGetGame.test.ts @@ -114,7 +114,6 @@ describe("response", () => { gameId: "game1", gameName: "Test Game", gameDescription: "A test game", - publicNotes: "Some notes", createdAt: "2023-01-01", updatedAt: "2023-01-02", fireflyUserId: "user1", @@ -160,7 +159,6 @@ describe("response", () => { gameId: "game1", gameName: "Test Game", gameDescription: "A test game", - publicNotes: "Some notes", playerSheets: [ { userId: "user1", @@ -205,7 +203,6 @@ describe("response", () => { gameId: "game1", gameName: "Test Game", gameDescription: "A test game", - publicNotes: "Some notes", fireflyUserId: "user1", createdAt: "2023-01-01", updatedAt: "2023-01-02", @@ -251,7 +248,6 @@ describe("response", () => { gameId: "game1", gameName: "Test Game", gameDescription: "A test game", - publicNotes: "Some notes", playerSheets: [ { userId: "user1", @@ -322,7 +318,6 @@ describe("response", () => { gameId: "game1", gameName: "Test Game", gameDescription: "A test game", - publicNotes: "Some notes", createdAt: "2023-01-01", updatedAt: "2023-01-02", type: TypeGame, @@ -350,12 +345,11 @@ describe("makeGameData", () => { gameId: "game1", gameName: "Test Game", gameDescription: "A test game", - publicNotes: "Some notes", createdAt: "2023-01-01", updatedAt: "2023-01-02", joinToken: "token", type: TypeGame, - players: ["user1", "user2"], + players: ["user3", "user2"], fireflyUserId: "user1", }; @@ -365,7 +359,6 @@ describe("makeGameData", () => { gameId: "game1", gameName: "Test Game", gameDescription: "A test game", - publicNotes: "Some notes", joinToken: null, playerSheets: [], createdAt: "2023-01-01", @@ -379,12 +372,11 @@ describe("makeGameData", () => { gameId: "game1", gameName: "Test Game", gameDescription: "A test game", - publicNotes: "Some notes", createdAt: "2023-01-01", updatedAt: "2023-01-02", joinToken: "token", type: TypeGame, - players: ["user1", "user2"], + players: ["user3", "user2"], fireflyUserId: "user1", }; @@ -394,7 +386,6 @@ describe("makeGameData", () => { gameId: "game1", gameName: "Test Game", gameDescription: "A test game", - publicNotes: "Some notes", playerSheets: [], joinToken: "token", createdAt: "2023-01-01",