Skip to content

Commit

Permalink
UI work; better login/logout, TopBar, Game page
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrod-lowe committed Sep 8, 2024
1 parent 25ca562 commit 0aa9b3e
Show file tree
Hide file tree
Showing 17 changed files with 854 additions and 110 deletions.
24 changes: 24 additions & 0 deletions appsync/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export type JoinGameInput = {
export type Mutation = {
__typename?: 'Mutation';
createGame: Game;
createSection: SheetSection;
joinGame: Game;
updateSection: SheetSection;
};


Expand All @@ -56,10 +58,20 @@ export type MutationCreateGameArgs = {
};


export type MutationCreateSectionArgs = {
input: UpdateSectionInput;
};


export type MutationJoinGameArgs = {
input: JoinGameInput;
};


export type MutationUpdateSectionArgs = {
input: UpdateSectionInput;
};

export type PlayerSheet = {
__typename?: 'PlayerSheet';
characterName: Scalars['String']['output'];
Expand Down Expand Up @@ -94,9 +106,21 @@ export type QueryGetGameArgs = {

export type SheetSection = {
__typename?: 'SheetSection';
content: Scalars['String']['output'];
createdAt: Scalars['AWSDateTime']['output'];
gameId: Scalars['ID']['output'];
sectionId: Scalars['ID']['output'];
sectionName: Scalars['String']['output'];
sectionType: Scalars['String']['output'];
type: Scalars['String']['output'];
updatedAt: Scalars['AWSDateTime']['output'];
userId: Scalars['ID']['output'];
};

export type UpdateSectionInput = {
content?: InputMaybe<Scalars['String']['input']>;
gameId: Scalars['ID']['input'];
sectionName: Scalars['String']['input'];
sectionType: Scalars['String']['input'];
userId: Scalars['ID']['input'];
};
22 changes: 19 additions & 3 deletions appsync/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export const getGameQuery = `
query getGame($id: ID!) {
getGame(id: $id) {
gameId gameName gameDescription 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 sectionId type sectionName sectionType content createdAt updatedAt } type createdAt updatedAt } joinToken createdAt updatedAt type
}
}
`;
Expand All @@ -21,15 +21,31 @@
export const createGameMutation = `
mutation createGame($input: CreateGameInput!) {
createGame(input: $input) {
gameId gameName gameDescription 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 sectionId type sectionName sectionType content createdAt updatedAt } type createdAt updatedAt } joinToken createdAt updatedAt type
}
}
`;

export const joinGameMutation = `
mutation joinGame($input: JoinGameInput!) {
joinGame(input: $input) {
gameId gameName gameDescription 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 sectionId type sectionName sectionType content createdAt updatedAt } type createdAt updatedAt } joinToken createdAt updatedAt type
}
}
`;

export const createSectionMutation = `
mutation createSection($input: UpdateSectionInput!) {
createSection(input: $input) {
userId gameId sectionId type sectionName sectionType content createdAt updatedAt
}
}
`;

export const updateSectionMutation = `
mutation updateSection($input: UpdateSectionInput!) {
updateSection(input: $input) {
userId gameId sectionId type sectionName sectionType content createdAt updatedAt
}
}
`;
Expand Down
Loading

0 comments on commit 0aa9b3e

Please sign in to comment.