Commit Graph

69 Commits

Author SHA1 Message Date
d6dda14cfd
Remove package.yaml
This reduces duplication between the modified cabal file and
package.yaml.
2021-04-07 10:12:40 +02:00
328e6acdee
Emit list item errors once 2021-03-16 10:08:13 +01:00
d74e27e903 traverseMaybe OrderedMap 2021-02-15 09:04:16 +01:00
2839b28590 Release 0.11.1.0 2021-02-07 08:10:46 +01:00
ebf4f4d24e Update stack snapshot to 17.x. 2021-02-02 07:15:30 +01:00
1c7554c328 Validate variable usage is allowed in objects 2021-01-22 09:26:22 +01:00
22abf7ca58 Validate variable usages are allowed in arguments 2020-12-26 06:31:56 +01:00
2bcae9e0a7 Implement Show class for GraphQL type definitions
.. in the `Type` modules.
2020-12-14 22:36:27 +01:00
86a0e00f7e Collect interface implementations 2020-11-17 08:10:32 +01:00
f5209481aa Extract collectFields function 2020-11-11 08:49:45 +01:00
6e8d8a34a1 Reflect infrastructure and license changes 2020-10-30 07:06:36 +01:00
7c0b0ace4d Collect types once the schema is created 2020-10-07 05:24:51 +02:00
4602eb1df3 Validate arguments are defined 2020-09-28 07:06:15 +02:00
38c3097bcf Validate fragments are input types 2020-09-20 06:59:27 +02:00
497b93c41b Validate arguments have unique names 2020-09-17 10:33:37 +02:00
f6ff0ab9c7 Validate fragments on composite types 2020-09-07 22:01:49 +02:00
33318a3b01 Validate fragment spread target existence 2020-08-31 11:06:27 +02:00
e6a6926e18 Validate anonymous operation definitions 2020-08-26 18:58:48 +02:00
1a788a6261 Loose monad condition on test methods 2020-08-20 20:53:47 +02:00
c60dd98fc5 Release 0.9.0.0 2020-07-24 21:58:49 +02:00
ae2210f659 Support subscriptions
This is experimental support.
The implementation is based on conduit and is boring. There is a new
resolver data constructor that should create a source event stream. The
executor receives the events, pipes them through the normal execution
and puts them into the response stream which is returned to the user.

- Tests are missing.
- The executor should check field value resolver on subscription types.
- The graphql function should probably return (Either
  ResponseEventStream Response), but I'm not sure about this. It will
  make the usage more complicated if no subscriptions are involved, but
  with the current API implementing subscriptions is more
  difficult than it should be.
2020-07-14 19:37:56 +02:00
b2d473de8d Export sum type for all GraphQL types 2020-07-06 19:10:34 +02:00
705e506c13 Combine Resolver and ActionT in ResolverT 2020-06-29 13:14:23 +02:00
175268b422 Add a github actions workflow 2020-06-24 10:12:22 +02:00
91bd2d0d81 Fix list input coercion 2020-06-19 10:53:41 +02:00
c37b9c88b1 Skip unknown fields 2020-06-10 11:42:00 +02:00
fdb1268213 Add custom Eq instances to the types 2020-06-09 10:02:34 +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
c3ecfece03 Coerce variable values 2020-05-21 10:20:59 +02:00
9232e08eb9 Release 0.7.0.0 2020-05-11 12:34:48 +02:00
500cff20eb Separate Query and Mutation resolvers
Fixes #33 .
2020-05-10 18:32:58 +02:00
387d158bd1 Write contrinbuting guidelines 2020-04-12 08:32:39 +02:00
613e929d91 Update to Stack 15.x 2020-02-20 05:16:14 +01:00
c0e5e30e76 Document schema AST
Fixes #8.
2020-02-14 06:20:05 +01:00
e8b82122c6 Try all extension parsers 2020-01-28 11:08:28 +01:00
cb5270b197 Update copyright 2020-01-21 23:27:21 +01:00
6d951491be Replace Parser.manyNE with NonEmpty.some 2020-01-12 07:19:28 +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
bdf711d69f Release 0.6.1.0 2019-12-23 06:35:32 +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
3497784984 Release 0.6.0.0 2019-11-27 08:26:51 +01:00
625d7100ca Try type parsers in a different order 2019-11-22 08:00:50 +01:00
31c516927d Support nested fragments in any order
Fix #19.
2019-11-12 10:47:10 +01:00
b77da3d492 AST.Transform: Pass down a reader
The reader contains variable substitution functions and fragments.
2019-11-07 06:34:36 +01:00
0e3b6184be Save fragments in a hash map
Fixes #20.
2019-10-31 07:32:51 +01:00
75bc3b8509 Release 0.5.1.0 2019-10-22 07:07:54 +02:00
c7d5b02911 Handle top-level fragments
Fixes #17.
2019-10-19 10:00:25 +02:00
37254c8c95 Inline fragments without type
Fixes #11.
2019-10-11 23:28:55 +02:00
0d142fb01c Set STACK_ROOT to cache dependencies in the CI
Set STACK_ROOT to cache dependencies between the builds.
2019-09-30 07:09:58 +02:00