haskell-graphql / graphql-api

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

HasResolver for enum is not monadic #118

Closed teh closed 6 years ago

teh commented 7 years ago

In all our other HasResolver instances the Handler type is m x, for for enum it's not.

instance forall m ksN enum. (Applicative m, API.GraphQLEnum enum) => HasResolver m (API.Enum ksN enum) where
  type Handler m (API.Enum ksN enum) = enum

should probably be

  type Handler m (API.Enum ksN enum) = m enum

Backwards incompatible change though, so we'd need an 0.2 release