diff --git a/apps/demo-game/src/components/DecisionsDisplay.tsx b/apps/demo-game/src/components/DecisionsDisplay.tsx index b260f099..ec3d73d5 100644 --- a/apps/demo-game/src/components/DecisionsDisplay.tsx +++ b/apps/demo-game/src/components/DecisionsDisplay.tsx @@ -107,9 +107,9 @@ function DecisionsDisplayCompact({ segmentDecisions }: DecisionDisplayProps) { {segmentDecisions.map((e) => { return ( - + - P{e.period.index + 1} S{e.segment.index + 1} + P{e.period?.index + 1} S{e.segment?.index + 1} diff --git a/apps/demo-game/src/graphql/generated/nexus-typegen.ts b/apps/demo-game/src/graphql/generated/nexus-typegen.ts index ff830429..c7c56872 100644 --- a/apps/demo-game/src/graphql/generated/nexus-typegen.ts +++ b/apps/demo-game/src/graphql/generated/nexus-typegen.ts @@ -387,6 +387,7 @@ export interface NexusGenFieldTypes { } Query: { // field return type game: NexusGenRootTypes['Game'] | null; // Game + gameWithoutFacts: NexusGenRootTypes['Game'] | null; // Game games: NexusGenRootTypes['Game'][] | null; // [Game!] learningElement: NexusGenRootTypes['LearningElementState'] | null; // LearningElementState learningElements: NexusGenRootTypes['LearningElement'][] | null; // [LearningElement!] @@ -565,6 +566,7 @@ export interface NexusGenFieldTypeNames { } Query: { // field return type name game: 'Game' + gameWithoutFacts: 'Game' games: 'Game' learningElement: 'LearningElementState' learningElements: 'LearningElement' @@ -646,6 +648,9 @@ export interface NexusGenArgTypes { game: { // args id?: number | null; // Int } + gameWithoutFacts: { // args + id?: number | null; // Int + } learningElement: { // args id: string; // ID! } diff --git a/apps/demo-game/src/graphql/generated/ops.ts b/apps/demo-game/src/graphql/generated/ops.ts index 7e9a2544..4dfff0d6 100644 --- a/apps/demo-game/src/graphql/generated/ops.ts +++ b/apps/demo-game/src/graphql/generated/ops.ts @@ -332,6 +332,7 @@ export type PlayerState = { export type Query = { __typename?: 'Query'; game?: Maybe; + gameWithoutFacts?: Maybe; games?: Maybe>; learningElement?: Maybe; learningElements?: Maybe>; @@ -349,6 +350,11 @@ export type QueryGameArgs = { }; +export type QueryGameWithoutFactsArgs = { + id?: InputMaybe; +}; + + export type QueryLearningElementArgs = { id: Scalars['ID']['input']; }; @@ -515,6 +521,13 @@ export type GameQueryVariables = Exact<{ export type GameQuery = { __typename?: 'Query', game?: { __typename?: 'Game', id: string, status: GameStatus, name: string, activePeriodIx?: number | null, activeSegmentIx?: number | null, activePeriod?: { __typename?: 'Period', id: string, activeSegmentIx?: number | null, segmentCount?: number | null, activeSegment?: { __typename?: 'PeriodSegment', id: string, countdownExpiresAt?: any | null, countdownDurationMs?: number | null } | null, segments: Array<{ __typename?: 'PeriodSegment', id: string }> } | null, periods: Array<{ __typename?: 'Period', id: string, index: number, activeSegmentIx?: number | null, facts: any, segmentCount?: number | null, segments: Array<{ __typename?: 'PeriodSegment', id: string, index: number, countdownExpiresAt?: any | null, countdownDurationMs?: number | null, facts: any, learningElements: Array<{ __typename?: 'LearningElement', id: string, title: string }>, storyElements: Array<{ __typename?: 'StoryElement', id: string, title: string }> }> }>, players: Array<{ __typename?: 'Player', id: string, isReady: boolean, role?: string | null, number: number, name: string, facts: any, experience: number, experienceToNext: number, token: string }> } | null }; +export type GameWithoutFactsQueryVariables = Exact<{ + id?: InputMaybe; +}>; + + +export type GameWithoutFactsQuery = { __typename?: 'Query', game?: { __typename?: 'Game', id: string, status: GameStatus, name: string, activePeriodIx?: number | null, activeSegmentIx?: number | null, activePeriod?: { __typename?: 'Period', id: string, activeSegmentIx?: number | null, segmentCount?: number | null, activeSegment?: { __typename?: 'PeriodSegment', id: string, countdownExpiresAt?: any | null, countdownDurationMs?: number | null } | null, segments: Array<{ __typename?: 'PeriodSegment', id: string }> } | null, periods: Array<{ __typename?: 'Period', id: string, index: number, activeSegmentIx?: number | null, segmentCount?: number | null, segments: Array<{ __typename?: 'PeriodSegment', id: string, index: number, countdownExpiresAt?: any | null, countdownDurationMs?: number | null, learningElements: Array<{ __typename?: 'LearningElement', id: string, title: string }>, storyElements: Array<{ __typename?: 'StoryElement', id: string, title: string }> }> }>, players: Array<{ __typename?: 'Player', id: string, isReady: boolean, role?: string | null, number: number, name: string, facts: any, experience: number, experienceToNext: number, token: string }> } | null }; + export type GamesQueryVariables = Exact<{ [key: string]: never; }>; @@ -912,6 +925,7 @@ export type PlayerStateResolvers = { game?: Resolver, ParentType, ContextType, Partial>; + gameWithoutFacts?: Resolver, ParentType, ContextType, Partial>; games?: Resolver>, ParentType, ContextType>; learningElement?: Resolver, ParentType, ContextType, RequireFields>; learningElements?: Resolver>, ParentType, ContextType>; @@ -987,6 +1001,7 @@ export const SaveConsolidationDecisionDocument = {"kind":"Document","definitions export const UpdatePlayerDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdatePlayerData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"name"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"facts"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updatePlayerData"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"name"}}},{"kind":"Argument","name":{"kind":"Name","value":"facts"},"value":{"kind":"Variable","name":{"kind":"Name","value":"facts"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PlayerData"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PlayerData"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Player"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isReady"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"facts"}},{"kind":"Field","name":{"kind":"Name","value":"experience"}},{"kind":"Field","name":{"kind":"Name","value":"experienceToNext"}},{"kind":"Field","name":{"kind":"Name","value":"achievementKeys"}},{"kind":"Field","name":{"kind":"Name","value":"achievements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"count"}},{"kind":"Field","name":{"kind":"Name","value":"achievement"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"image"}},{"kind":"Field","name":{"kind":"Name","value":"reward"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"level"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"index"}}]}}]}}]} as unknown as DocumentNode; export const UpdateReadyStateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateReadyState"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"isReady"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateReadyState"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"isReady"},"value":{"kind":"Variable","name":{"kind":"Name","value":"isReady"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isReady"}}]}}]}}]} as unknown as DocumentNode; export const GameDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Game"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"game"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"GameData"}},{"kind":"Field","name":{"kind":"Name","value":"activePeriod"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"activeSegmentIx"}},{"kind":"Field","name":{"kind":"Name","value":"activeSegment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"countdownExpiresAt"}},{"kind":"Field","name":{"kind":"Name","value":"countdownDurationMs"}}]}},{"kind":"Field","name":{"kind":"Name","value":"segmentCount"}},{"kind":"Field","name":{"kind":"Name","value":"segments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"periods"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PeriodData"}}]}},{"kind":"Field","name":{"kind":"Name","value":"players"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isReady"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"number"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"facts"}},{"kind":"Field","name":{"kind":"Name","value":"experience"}},{"kind":"Field","name":{"kind":"Name","value":"experienceToNext"}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SegmentData"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PeriodSegment"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"index"}},{"kind":"Field","name":{"kind":"Name","value":"countdownExpiresAt"}},{"kind":"Field","name":{"kind":"Name","value":"countdownDurationMs"}},{"kind":"Field","name":{"kind":"Name","value":"facts"}},{"kind":"Field","name":{"kind":"Name","value":"learningElements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}},{"kind":"Field","name":{"kind":"Name","value":"storyElements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GameData"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Game"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"activePeriodIx"}},{"kind":"Field","name":{"kind":"Name","value":"activeSegmentIx"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PeriodData"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Period"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"index"}},{"kind":"Field","name":{"kind":"Name","value":"activeSegmentIx"}},{"kind":"Field","name":{"kind":"Name","value":"facts"}},{"kind":"Field","name":{"kind":"Name","value":"segments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SegmentData"}}]}},{"kind":"Field","name":{"kind":"Name","value":"segmentCount"}}]}}]} as unknown as DocumentNode; +export const GameWithoutFactsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GameWithoutFacts"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"game"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"GameData"}},{"kind":"Field","name":{"kind":"Name","value":"activePeriod"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"activeSegmentIx"}},{"kind":"Field","name":{"kind":"Name","value":"activeSegment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"countdownExpiresAt"}},{"kind":"Field","name":{"kind":"Name","value":"countdownDurationMs"}}]}},{"kind":"Field","name":{"kind":"Name","value":"segmentCount"}},{"kind":"Field","name":{"kind":"Name","value":"segments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"periods"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"index"}},{"kind":"Field","name":{"kind":"Name","value":"activeSegmentIx"}},{"kind":"Field","name":{"kind":"Name","value":"segments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"index"}},{"kind":"Field","name":{"kind":"Name","value":"countdownExpiresAt"}},{"kind":"Field","name":{"kind":"Name","value":"countdownDurationMs"}},{"kind":"Field","name":{"kind":"Name","value":"learningElements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}},{"kind":"Field","name":{"kind":"Name","value":"storyElements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"segmentCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"players"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isReady"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"number"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"facts"}},{"kind":"Field","name":{"kind":"Name","value":"experience"}},{"kind":"Field","name":{"kind":"Name","value":"experienceToNext"}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GameData"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Game"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"activePeriodIx"}},{"kind":"Field","name":{"kind":"Name","value":"activeSegmentIx"}}]}}]} as unknown as DocumentNode; export const GamesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Games"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"games"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"GameData"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GameData"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Game"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"activePeriodIx"}},{"kind":"Field","name":{"kind":"Name","value":"activeSegmentIx"}}]}}]} as unknown as DocumentNode; export const LearningElementDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"LearningElement"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"learningElement"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"element"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LearningElementData"}},{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"content"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"solution"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LearningElementData"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningElement"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"question"}},{"kind":"Field","name":{"kind":"Name","value":"reward"}},{"kind":"Field","name":{"kind":"Name","value":"motivation"}},{"kind":"Field","name":{"kind":"Name","value":"feedback"}}]}}]} as unknown as DocumentNode; export const LearningElementsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"LearningElements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"learningElements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LearningElementData"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LearningElementData"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningElement"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"question"}},{"kind":"Field","name":{"kind":"Name","value":"reward"}},{"kind":"Field","name":{"kind":"Name","value":"motivation"}},{"kind":"Field","name":{"kind":"Name","value":"feedback"}}]}}]} as unknown as DocumentNode; diff --git a/apps/demo-game/src/graphql/generated/schema.graphql b/apps/demo-game/src/graphql/generated/schema.graphql index 07712eb6..3a3ace05 100644 --- a/apps/demo-game/src/graphql/generated/schema.graphql +++ b/apps/demo-game/src/graphql/generated/schema.graphql @@ -229,6 +229,7 @@ type PlayerState { type Query { game(id: Int): Game + gameWithoutFacts(id: Int): Game games: [Game!] learningElement(id: ID!): LearningElementState learningElements: [LearningElement!] diff --git a/apps/demo-game/src/graphql/generated/schema.json b/apps/demo-game/src/graphql/generated/schema.json index 70421fcf..83fb7d03 100644 --- a/apps/demo-game/src/graphql/generated/schema.json +++ b/apps/demo-game/src/graphql/generated/schema.json @@ -2838,6 +2838,31 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "gameWithoutFacts", + "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Game", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "games", "description": null, diff --git a/apps/demo-game/src/pages/admin/games/[id].tsx b/apps/demo-game/src/pages/admin/games/[id].tsx index 4a4c89fb..709f701d 100644 --- a/apps/demo-game/src/pages/admin/games/[id].tsx +++ b/apps/demo-game/src/pages/admin/games/[id].tsx @@ -76,7 +76,7 @@ function ManageGame() { const [isSegmentModalOpen, setIsSegmentModalOpen] = useState(false) const { data, error, loading } = useQuery(GameDocument, { - variables: { id: Number(router.query.id) }, + variables: { id: Number(router.query.id), includeFacts: true }, pollInterval: 15000, skip: !router.query.id, }) @@ -788,7 +788,7 @@ function ManageGame() {
{getButton()} - +
diff --git a/apps/demo-game/src/pages/play/cockpit.tsx b/apps/demo-game/src/pages/play/cockpit.tsx index 2d451a84..af52f71f 100644 --- a/apps/demo-game/src/pages/play/cockpit.tsx +++ b/apps/demo-game/src/pages/play/cockpit.tsx @@ -124,6 +124,13 @@ function GameLayout({ children }: { children: React.ReactNode }) { role: data.self.role, } + const tabs = [ + { + name: 'Reports', + href: `/reports/${data?.result?.currentGame?.id}`, + }, + ] + const sidebar = (
- +