Commit Graph

67 Commits

Author SHA1 Message Date
4c9264c12c Coerce argument values properly
Fixes #44.
2020-06-06 21:22:11 +02:00
93a0403288 Resolve abstract types
Objects that can be a part of an union or interface should return
__typename as string.
2020-06-03 07:20:38 +02:00
d12577ae71 Define resolvers on type fields
Returning resolvers from other resolvers isn't supported anymore. Since
we have a type system now, we define the resolvers in the object type
fields and pass an object with the previous result to them.
2020-05-29 13:53:51 +02:00
c06d0b8e95 Add Union and Interface type definitions 2020-05-26 11:13:55 +02:00
61dbe6c728 Split input/output types and values into 2 modules 2020-05-25 07:41:21 +02:00
eb90a4091c Check point 2020-05-24 13:51:00 +02:00
7cd4821718 Don't fail on invalid fragments and variables 2020-05-23 21:49:57 +02:00
26cc53ce06 Reject variables as default values 2020-05-22 10:11:48 +02:00
c3ecfece03 Coerce variable values 2020-05-21 10:20:59 +02:00
dd8f312cb3 Rewrite argument list to argument map 2020-01-01 10:58:11 +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
fdf5914626 Move AST to AST.Document 2019-12-28 07:07:58 +01:00
56d88310df Add definition module 2019-12-26 13:07:21 +01:00
62f3c34bfe Replace AST.Selection data constructors 2019-12-25 06:45:29 +01:00
0cbe69736b Move Execute.Directive to Type.Directive
Just to roughly follow the structure of the reference implementation.
2019-12-18 09:03:18 +01:00
4c0d226030 Move Transform to Language.GraphQL.Execute
Language.GraphQL.AST.Transform is an internal module. Even though it
works with the AST, it is a part of the execution process, it translates
the original parser tree into a simpler one, so the executor has less
work to do. Language.GraphQL.AST should contain only the parser and be
independent from other packages, so it can be used on its own.
2019-12-07 09:46:00 +01:00
3c1a5c800f Support directives (skip and include)
Fixes #24.
2019-12-06 22:52:24 +01:00