benjstorlie / sudoku-shuffle

Play sudoku
https://mighty-ridge-19238-3e456d2c37f3.herokuapp.com/
MIT License
0 stars 0 forks source link

15 server resolvers and mutations #30

Closed benjstorlie closed 1 year ago

benjstorlie commented 1 year ago

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

benjstorlie commented 1 year ago

Made PR #33 which picks up from where this one left off.