103 Commits

Author SHA1 Message Date
b40d8a7e1e
Parse repeatable directive definitions 2024-08-27 10:51:01 +02:00
388af30b51
Fix GHC 9.8 warnings 2024-08-06 18:19:07 +02:00
e02463f452
Remove unused liftA2 import 2024-08-04 09:06:03 +02:00
fdc43e4e25 Fix non nullable type representation
…in executor error messages.
2023-10-13 20:42:24 +02:00
83f2dc1a2d
Encode type extensions 2023-02-25 10:15:22 +01:00
d83f75b341
Encode schema extensions 2023-01-26 06:47:44 +01:00
05fa5df558
Encode directive definitions 2023-01-11 10:28:45 +01:00
9021f3a25d
Encode input object types 2023-01-10 09:53:18 +01:00
025331a9ee
Encode enums 2023-01-09 20:56:21 +01:00
ab4808c44d
Encode unions 2023-01-08 17:33:25 +01:00
bb4375313e
Encode object type definitions 2023-01-03 13:10:33 +01:00
70dedb6911
Encode interfaces (2018) 2023-01-02 10:30:37 +01:00
a96d4e6ef3
Add Semigroup and Monoid instances for Description 2022-12-27 10:38:08 +01:00
3ce6e7da46
Encode schema definitions 2022-12-25 16:38:00 +01:00
a5cf0a32e8
Replace ">> pure ()" with void 2022-12-24 18:59:40 +01:00
bf2e4925b4
Add operation type encoder 2022-10-02 11:38:53 +02:00
2f19093803
Change execute' to shouldResolveTo helper method 2022-07-01 12:18:02 +02:00
Dmitrii Skurikhin
8503c0f288 enhance query errors 2022-02-16 08:58:16 +01:00
Dmitrii Skurikhin
0c8edae90a fix empty list argument parsing 2022-01-09 09:00:56 +01:00
de4f69ab03
Add CHANGELOG entries for the new executor 2021-09-04 07:12:34 +02:00
4d762d6356
Add location information to list values 2021-03-14 12:19:30 +01:00
Ben Sinclair
ca0f0bd32d Fix some issues with directive definitions
I found some issues with directive definitions:

- I couldn't use `on FIELD_DEFINITION`, I believe because `FIELD` was parsed
  first in `executableDirectiveLocation`. I've combined both
  `executableDirectiveLocation` and `typetypeSystemDirectiveLocation` into one
  function which can reorder them to ensure every directive location gets a fair
  chance at parsing.

Not actually to do with directives, some literals weren't being parsed
correctly.

- The GraphQL spec defines list to be `[]` or `[Value]`, but empty literal lists
  weren't being parsed correctly because of using `some` instead of `many`.

- The GraphQL spec defines objects to be `{}` or `{Name: Value}`, but empty
  literal objects had the same issue.
2021-02-21 23:35:34 +11:00
1e8405a6d6 Document AST.Document.escape 2021-02-11 12:02:08 +01:00
b27da54bf4 Provide custom Show instances for AST values 2021-02-04 08:12:12 +01:00
a034f2ce4d Validate values 2021-02-03 05:47:40 +01:00
5a6709030c Add show instances for AST type representation 2020-12-17 20:42:47 +01:00
7c0b0ace4d Collect types once the schema is created 2020-10-07 05:24:51 +02:00
a91bc7f2d2 Validate required input fields 2020-10-05 14:51:21 +02:00
6daae8a521 Validate directives are in valid locations 2020-10-02 06:31:38 +02:00
56b63f1c3e Validate input object field names 2020-09-30 05:14:52 +02:00
9bfa2aa7e8 Validate input fields have unique names 2020-09-24 05:47:31 +02:00
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