Commit Graph

72 Commits

Author SHA1 Message Date
3e393004ae Validate all variables are defined 2020-09-21 07:28:40 +02:00
21a7d9cce4 Validate variable names are unique 2020-09-19 18:18:26 +02:00
9a08aa5de7 Validate directives are unique per location 2020-09-18 07:32:58 +02:00
4c10ce9204 Use Seq as base monad in the validator
It is more natural to implement the logic: try to apply each rule to
each node.
2020-09-15 08:06:07 +02:00
c2c57b6363 Validate all fragments are used 2020-09-09 17:04:31 +02:00
f6ff0ab9c7 Validate fragments on composite types 2020-09-07 22:01:49 +02:00
d327d9d1ce Validate fragment spread type existence 2020-09-05 10:00:58 +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
7355533268 Validate single root field in subscriptions 2020-08-25 21:03:42 +02:00
54dbf1df16 Remove encoder test based on old external files 2020-08-22 06:39:52 +02:00
44d506d4b5 Draft the Validation API 2020-07-20 21:29:12 +02:00
840e129c44 Parse subscriptions 2020-07-11 06:34:10 +02:00
04a58be3f8 Label parsers with help info
Fixes #36.
2020-07-10 08:43:47 +02:00
28781586a5 Parse comments in the front of definitions 2020-07-09 08:11:12 +02:00
c9e265f72c Return parser error location in a list
An error can have multiple locations which are returned in a listt with
key "locations".
2020-07-08 08:17:55 +02:00
8b164c4844 Move Core module out of AST 2020-06-30 10:28:10 +02:00
377c87045e Add description to the enum type values 2020-06-07 06:16:45 +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
eb90a4091c Check point 2020-05-24 13:51:00 +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
Dmitrii Skurikhin
2760bd8ee1 Don't encode controls as block strings
Fixes #39.

String containing control sequences should be encoded as simple strings
even if they contain newlines, since the block strings can contain only
SourceCharacters.
2020-04-10 11:19:36 +02:00
Dmitrii Skurikhin
30d6a0a58d encode null value as "null" 2020-03-31 10:04:34 +03: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
a6bd2370b6 Parse type extensions
Signed-off-by: Eugen Wissner <belka@caraus.de>
2020-01-26 11:55:15 +01:00
b4a3c98114 Parse schema extensions 2020-01-25 16:45:39 +01:00
3ef27f9d11 Add "extend symbol" lexer to parse extensions 2020-01-17 12:29:06 +01:00
ba710a3c96 Parse complete TypeSystemDefinition 2020-01-15 20:20:50 +01:00
d257d05d4e Parse enum and input object type definitions 2020-01-13 08:21:02 +01:00
adffa185bb Parse interface type definition 2020-01-13 08:21:02 +01:00
f4ed06741d Parse union definitions 2020-01-13 08:21:02 +01:00
8efb08fda1 Parse ObjectDefinition 2020-01-13 08:21:02 +01:00
d9a2937b55 Parse SchemaDefinition 2020-01-13 08:18:30 +01:00
f4f076fa59 Reduce usage of the opt parser
opt directives = some directive
All other occurrences of opt parse an optional list withing some
delimiters (braces, parens).
2020-01-13 08:11:22 +01:00
6d951491be Replace Parser.manyNE with NonEmpty.some 2020-01-12 07:19:28 +01:00
dd8f312cb3 Rewrite argument list to argument map 2020-01-01 10:58:11 +01:00
fdf5914626 Move AST to AST.Document 2019-12-28 07:07:58 +01:00
78ee76f9d5 Define schema AST.
Large parts of the schema aren't exported publically. They will be made
public during writing the parser.

Fixes #6.
2019-12-27 09:14:12 +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
b215e1a4a7 Pretify multi-line string arguments as block strings
Fixes #10.
2019-12-21 09:25:05 +01:00
1e55f17e7e Encode Unicode. Fix #34 2019-12-20 07:58:09 +01:00
9a5d54c035 Escape non-source characters in the encoder 2019-12-19 06:59:27 +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
fc9ad9c4a1 Consider __typename when evaluating fragments
Fixes #30.
2019-12-02 07:43:19 +01:00
Sam Nolan
def52ddc20 Fix strings not consuming spaces
Fixes #28
2019-11-28 19:09:26 +11:00