Open revskill10 opened 6 years ago
You would have to write your own parser or submit one as a PR here.
@jml Any hint to do that ? Because the resulting response type seems arbitrary as a HashMap. My use case is to use with GHCJS.
No, sorry. On Mon, 9 Jul 2018 at 06:46, Truong Hoang Dung notifications@github.com wrote:
@jml https://github.com/jml Any hint to do that ? Because the resulting response type seems arbitrary as a HashMap.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/haskell-graphql/graphql-api/issues/190#issuecomment-403366298, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHq6qvMQWX9RV9nL5lZVlaOi9CbwHnFks5uEu4YgaJpZM4VGjvd .
@checkraiser I'm currently writing a converter of a JSON object into a GraphQL haskell type given an existing schema. While my use case is for variables provided as a JSON map, and thus I'm only writing it for InputType, perhaps you'll be able to extend it to fit your use case.
@theobat Actually i think in this case, the nature of response result type consumed by client is too generic. To actually build up state on client side, we have to use something like aeson-lens
to parse. I don't think if there's a better way that we could take advantage of Schema Type here (even in case you can convert into GrpahQL haskell type), you must do another conversion to base data types after all to use it to build client-side state.
Currently,
Object
doesn't have instance offromJSON
, so how can we convert back Response to Haskell Type from JSON Response ?