Closed Happy0 closed 6 years ago
Hi @Happy0,
I don't have time to look into this right now—maybe some day though. Perhaps someone else might be able to answer your question.
You also might want to try asking the question with a haskell-graphql
tag on StackOverflow.
Kind regards, jml
I've got past that particular problem - on to the next!
For anyone else running into a similar error (trying to avoid this situation here: https://xkcd.com/979/) :
I got past that particular problem by changing my types from [ Type ] to List Type, and Int to Int32 in my field definitions in this commit here:
https://github.com/Happy0/lichess-graphql-api/commit/ba5b0e75ed1f7132015b159724295cffd6442172
This is because the types you're using have to implement the 'HasResolver' typeclass. The 'Int32' and 'List' types are examples of types that already implement this typeclass:
Thanks for replying, and for sharing your solution!
Sorry if this is the wrong place to ask for help. Please let me know if there's an alternative...
I started a toy project tonight to try and learn about graphQL / some more haskell (and possibly haxl for concurrently handling the graphql query): https://github.com/Happy0/lichess-graphql-api
When I try to build it I'm getting the following error:
I'm not sure how to resolve this error.
Here's some context about where the error might be coming from:
I set up my 'User' type to have a 'games' field for paging through a user's list of chess games on a chess site: https://github.com/Happy0/lichess-graphql-api/blob/master/src/Lichess/GraphQL/Model/User.hs
I set up a top level 'Query' type that has a field for getting a particular user: https://github.com/Happy0/lichess-graphql-api/blob/master/src/Lichess/GraphQL/Api.hs
And a handler for the 'Query' type: https://github.com/Happy0/lichess-graphql-api/blob/master/src/Lichess/GraphQL/Lib.hs (note: i made gameConnectionHandler return 'undefined' for now.)
Any suggestions about what I might be doing wrong?
Thanks Gordon