Commit Graph

10 Commits

Author SHA1 Message Date
3373c94895 Validate field selections on composite types 2020-09-26 07:57:25 +02:00
b9d5b1fb1b Return a stream as well from graphql* functions 2020-07-19 07:36:06 +02:00
09135c581a Constrain base monad to MonadCatch
Let's try MonadThrow/MonadCatch. It looks nice at a first glance. The
monad transformer stack contains only the ReaderT, less lifts are
required. Exception subtyping is easier, the user can (and should)
define custom error types and throw them. And it is still possible to
use pure error handling, if someone doesn't like runtime exceptions or
need to run a query in a pure environment.

Fixes #42.
2020-07-17 07:05:03 +02:00
a6f9cec413 Handle errors using custom types
Fixes #32.
2020-07-05 14:36:00 +02:00
882276a845 Coerce result
Fixes #45.
2020-06-13 07:20:19 +02:00
7cd4821718 Don't fail on invalid fragments and variables 2020-05-23 21:49:57 +02:00
c3ecfece03 Coerce variable values 2020-05-21 10:20:59 +02:00
67bebf853c Replace MonadIO constraint with just Monad
And make the tests use Identity instead of IO.
2020-02-01 20:46:35 +01:00
44dc80bb37 Replace substitution function with a map
It makes using variables with queries more approachable, but some work
still has to be done.
- The type `Subs` should be renamed and moved out of `Schema`, together with
`AST.Core.Value` probably.
- Some kind of conversion should be possible from a user-defined input
type T to the Value. So the final HashMap should have a type like
`HashMap name a`, where a is an instance of a potential typeclass
InputType.
2019-12-30 18:26:24 +01:00
eb40810f25 Replace tasty and HUnit with Hspec 2019-07-10 05:57:35 +02:00