Commit Graph

193 Commits

Author SHA1 Message Date
7b00e8a0ab
Deprecate unused functions from the old executor 2021-09-05 09:14:57 +02:00
7444895a58
Remove unused (and not exposed) Execute.Internal 2021-09-04 07:27:51 +02:00
de4f69ab03
Add CHANGELOG entries for the new executor 2021-09-04 07:12:34 +02:00
b96d75f447
Replace the old executor 2021-09-03 22:47:49 +02:00
7b4c7e2b8c
Handle argument locations 2021-09-02 08:45:23 +02:00
233a58094d
Adjust value completion tests 2021-09-01 09:27:12 +02:00
c0d41a56ce Show the value and expected type in value completion errors 2021-08-31 17:30:04 +02:00
c7e586a125 Copy subscription code 2021-08-31 17:30:04 +02:00
f808d0664f Handle errors 2021-08-31 17:30:04 +02:00
2dafb00a16 Use sequences of selections 2021-08-31 17:30:04 +02:00
5505739e21 Collect fields 2021-08-31 17:30:04 +02:00
db721a3f53 Skip recursive fragments and marked fields 2021-08-31 17:30:04 +02:00
fef7c1ed98 Inline fragment spreads 2021-08-31 17:30:04 +02:00
4f7e990bf9 Use directives from the Type module 2021-08-31 17:30:04 +02:00
5e234ad4a9 Pass variables when generating the IR 2021-08-31 17:30:04 +02:00
9babf64cf6 Stub selection execution 2021-08-31 17:30:04 +02:00
5751870d2a Rewrite the executor tree 2021-08-31 17:30:04 +02:00
d7422e46ca Provide error information for variable definitions 2021-08-31 17:30:04 +02:00
f527b61a3d Stub request execution 2021-08-31 17:30:04 +02:00
38ec439e9f Handle query errors on invalid operations 2021-08-31 17:30:04 +02:00
dd996570c2 Add new executor module 2021-08-31 17:30:04 +02:00
cc8f14f122
Provide a custom Show instance for output Value 2021-08-31 17:29:20 +02:00
b99bb72272
Report subscription error locations 2021-07-02 09:28:03 +02:00
b580d1a988
Attach the field location to resolver exceptions 2021-06-27 13:42:58 +02:00
96bb061666
Fail with a location for result coercion
The intermediate representation was further modified so that the
operation definitions contain location information. Probably I should
introduce a data type that generalizes fields and operations, so it
contains object type, location and the selection set, so the functions
don't accept so many arguments.
2021-06-24 09:29:24 +02:00
812f6967d4
Provide locations for argument errors
The executor still doesn't give an error per argument, but a single
error per field with locations for all arguments.
If a non-null argument isn't specified, only the error location of the
field is given. If some arguments cannot be coerced, only the locations
of these arguments are given, non-null arguments are ignored. This
should still be improved, so the executor returns all errors at once.
The transformation tree is changed, so that argument map contains
locations of the arguments (but not the locations of the argument values
yet).
2021-06-22 09:13:27 +02:00
6fe9eb72e4
Fix merging fields with arguments
executeField shouldn't assume that a selection has only one field with a
given name, but it should take the first field. The underlying cause is
a wrong pattern, which (because of the laziness) is executed only if the
field has arguments.
2021-06-18 06:51:14 +02:00
2ce2be5d91
Provide location information for interface errors 2021-06-17 08:15:27 +02:00
c311cb0070
Add constructor with additional schema types 2021-05-13 17:40:38 +02:00
1b7cd85216
Add location information to the intermediate tree 2021-05-12 06:51:59 +02:00
f671645043
Remove unused QueryError.TransformationError 2021-05-11 07:11:47 +02:00
1af95345d2 Deprecate internal error generation functions
The functions generating errors in the executor should be changed anyway
when we provide better error messages from the executor, with the error
location and response path. So public definitions of these functions are
deprecated now and they are replaced by more generic functions in the
executor code.
2021-05-10 09:43:39 +02:00
0d23df3da2
Provide an internal function to add errors
The old function, addErrMsg, takes only a string with an error
description, but more information is required for the execution errors:
locations and path. addErrMsg should be deprecated after the switching
to the new addError.
2021-05-09 12:42:02 +02:00
5a5f265fe4 Validate non-nullable values inside lists 2021-05-06 22:23:16 +02:00
2220f0ca56
Remove unused OverloadedStrings pragmas 2021-04-14 07:09:21 +02:00
5654b78935
Traverse input object properties once 2021-04-12 07:09:39 +02:00
328e6acdee
Emit list item errors once 2021-03-16 10:08:13 +01: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
10e4d64052 Replace Map with OrderedMap 2021-02-19 08:09:04 +01:00
d74e27e903 traverseMaybe OrderedMap 2021-02-15 09:04:16 +01:00
90d36f66b9 Combine value inserted into the OrderedMap 2021-02-14 14:46:06 +01:00
c1a1b47aea Add OrderedMap prototype 2021-02-13 06:56:10 +01: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
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
c018657e25 Fix the type in messages when validating variables 2021-01-04 08:24:50 +01:00
71a5964c27 Rename variablesInAllowedPositionRule's variables
Name variablesInAllowedPositionRule's variables more meaningful.
2020-12-27 11:47:29 +01:00