haskell-graphql / graphql-api

Write type-safe GraphQL services in Haskell
BSD 3-Clause "New" or "Revised" License
406 stars 35 forks source link

Nullable handler doesn't support objects #102

Closed jml closed 7 years ago

jml commented 7 years ago

Probably.

Code is:

instance forall m hg. (HasResolver m hg, Functor m, ToValue (Maybe hg)) => HasResolver m (Maybe hg) where
  type Handler m (Maybe hg) = m (Maybe hg)
  resolve handler _ =  map (ok . toValue) handler

Note that it discards the selection set. That can't be good.

teh commented 7 years ago

Didn't you just remove this code in #101?

jml commented 7 years ago

Nope. Removing it broke the tests. Just pushed a revised #101 which restores the code together with a comment that explains what it does and why it's broken.