summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/Execute
AgeCommit message (Collapse)Author
2024-10-13Validate repeatable directivesEugen Wissner
2023-02-26Remove JSON support in the core packageEugen Wissner
2022-06-30Document usage of the json flagEugen Wissner
2021-12-24Put JSON support behind a flagEugen Wissner
2021-12-22Add Serialize and VariableValue value instancesEugen Wissner
- `Serialize` instance for `Type.Definition.Value`. - `VariableValue` instance for `Type.Definition.Value`. It makes it possible to use the library without an additional serialization format like JSON.
2021-09-05Deprecate unused functions from the old executorEugen Wissner
2021-09-04Remove unused (and not exposed) Execute.InternalEugen Wissner
2021-09-03Replace the old executorEugen Wissner
2021-07-02Report subscription error locationsEugen Wissner
2021-06-27Attach the field location to resolver exceptionsEugen Wissner
2021-06-24Fail with a location for result coercionEugen Wissner
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-22Provide locations for argument errorsEugen Wissner
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-18Fix merging fields with argumentsEugen Wissner
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-17Provide location information for interface errorsEugen Wissner
2021-05-12Add location information to the intermediate treeEugen Wissner
2021-05-11Remove unused QueryError.TransformationErrorEugen Wissner
2021-05-10Deprecate internal error generation functionsEugen Wissner
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-09Provide an internal function to add errorsEugen Wissner
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-03-14Add location information to list valuesEugen Wissner
2021-02-19Replace Map with OrderedMapEugen Wissner
2021-02-15traverseMaybe OrderedMapEugen Wissner
2021-02-14Combine value inserted into the OrderedMapEugen Wissner
2021-02-13Add OrderedMap prototypeEugen Wissner
2020-10-07Collect types once the schema is createdEugen Wissner
2020-10-05Validate required input fieldsEugen Wissner
2020-09-30Validate input object field namesEugen Wissner
2020-09-28Validate arguments are definedEugen Wissner
2020-09-26Validate field selections on composite typesEugen Wissner
2020-09-24Validate input fields have unique namesEugen Wissner
2020-09-21Validate all variables are definedEugen Wissner
2020-09-20Validate fragments are input typesEugen Wissner
2020-09-19Validate variable names are uniqueEugen Wissner
2020-09-18Validate directives are unique per locationEugen Wissner
2020-09-16Move path to the execution errorEugen Wissner
Since it isn't possible to get a path during validation, without executing the query.
2020-09-15Use Seq as base monad in the validatorEugen Wissner
It is more natural to implement the logic: try to apply each rule to each node.
2020-09-09Validate all fragments are usedEugen Wissner
2020-09-07Validate fragments on composite typesEugen Wissner
2020-09-05Validate fragment spread type existenceEugen Wissner
2020-08-31Validate fragment spread target existenceEugen Wissner
2020-08-25Validate single root field in subscriptionsEugen Wissner
2020-08-22Remove encoder test based on old external filesEugen Wissner
2020-07-20Draft the Validation APIEugen Wissner
2020-07-17Constrain base monad to MonadCatchEugen Wissner
Let's try MonadThrow/MonadCatch. It looks nice at a first glance. The monad transformer stack contains only the ReaderT, less lifts are required. Exception subtyping is easier, the user can (and should) define custom error types and throw them. And it is still possible to use pure error handling, if someone doesn't like runtime exceptions or need to run a query in a pure environment. Fixes #42.
2020-07-15Respect subscriptions in the executorEugen Wissner
After the last commit there were a few places needed to be adjusted to support subscriptions. This is done and a test case is added. It is important to implement subscriptions now, because they require changes to the library API, and they are a big missing part to finish the executor. When the executor is finished, we can start to provide more stable API without breaking everything every release. Validation and introspection shouldn't require much changes to the API; AST would require some changes to report good errors after the validation - this is one thing I can think of. Fixes #5.
2020-07-14Support subscriptionsEugen Wissner
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-11Parse subscriptionsEugen Wissner
2020-07-06Export sum type for all GraphQL typesEugen Wissner
2020-07-02Merge Trans and Type.Out modulesEugen Wissner
2020-06-30Move Core module out of ASTEugen Wissner
2020-06-29Combine Resolver and ActionT in ResolverTEugen Wissner