Commit Graph

50 Commits

Author SHA1 Message Date
adeba459a2 Release 0.9.0.0 2020-07-24 21:34:31 +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
f767f6cd40 Ignore graphql.cabal
This file is generated and for releases another version is generated
anyway.
2019-09-29 07:39:18 +02:00
70f7e1bd8e Document undocumented modules
Fixes #15.
2019-09-25 05:35:36 +02:00
2b5c719ab0 Fix haddoc warnings
Fix #14.
2019-09-20 08:47:14 +02:00
721cbaee17 Release 0.5.0.1 2019-09-10 10:20:40 +02:00
63d4de485d Deprecate enum, enumA, wrappedEnum, wrappedEnumA
These functions are from Language.GraphQL.Schema.
There are actually only two generic types in GraphQL: Scalars and objects.
Enum is a scalar value. According to the specification enums may be
serailized to strings. And in the current implementation they used
untyped strings anyway, so there is no point to have differently named
functions with the same implementation as their scalar counterparts.
2019-09-01 03:16:27 +02:00
c1943c1979 Document all public symbols.
Mostly basic documentation. Fixes #4.
2019-08-29 07:40:50 +02:00
5175586def Provide more documentation on functions and types 2019-08-26 10:14:46 +02:00
6604fba7f4 Update stack snapshot to 14.0 2019-08-12 07:25:40 +02:00
4812c8f039 Introduce formatter type for the encoder
... to distinguish between minified and pretty printing.
2019-07-31 05:40:17 +02:00
9d15b83164 Make the tutorial to compile again
- Remove generated documentation leaving only documentation sources.
- Add CI job checking that the tutorial is up to date.
2019-07-20 07:11:10 +02:00
f3b8d9b74c Make all exports explicit 2019-07-14 05:58:05 +02:00
6238b2fbfa Add nullable types 2019-07-03 17:54:50 +02:00
5e9bf9648d Parse queries with megaparsec 2019-06-21 10:44:58 +02:00
ce169ecef2 Add package.yaml, update stack snapshot to 13.25 2019-06-11 06:34:15 +02:00
Danny Navarro
a6b2fd297b Garden 2016-02-17 13:20:56 +01:00
Danny Navarro
781788e306 Drop support for older stackage versions 2016-02-08 17:33:51 +01:00
Danny Navarro
a70732a4b6 Pin stack to LTS-4.2 2016-01-26 13:35:53 +01:00
Danny Navarro
f88948e801 Support ghc-7.8 2015-09-16 10:36:59 +02:00
Danny Navarro
5af7136893 Initial commit
This includes a rough port of the data types at
https://github.com/graphql/graphql-js/blob/master/src/language/ast.js
2015-09-12 12:54:05 +02:00