I've checked this in the Apollo Sandbox and it looks okay.
Look at the server/schemas/typeDefs.js and the client/src/utils/queries.js and client/src/utils/mutations.js to see in what form data will come back.
The way stats works is that it gets updated if, in updateGame, it goes from isSolved:false to isSolved:true. So then it just adds that one game in. So what's returned from updateGame is always in the form { game: Game, stats: [Stats] }, but the stats array will only be included if you win.
I think it will be okay to just make some dummy data to use for putting the components together, and then those can be connected to useQuery and useMutation.
Merging this pull request should also close issue #15
I've checked this in the Apollo Sandbox and it looks okay.
Look at the server/schemas/typeDefs.js and the client/src/utils/queries.js and client/src/utils/mutations.js to see in what form data will come back.
The way stats works is that it gets updated if, in updateGame, it goes from isSolved:false to isSolved:true. So then it just adds that one game in. So what's returned from updateGame is always in the form { game: Game, stats: [Stats] }, but the stats array will only be included if you win.
I think it will be okay to just make some dummy data to use for putting the components together, and then those can be connected to useQuery and useMutation.
Merging this pull request should also close issue #15