summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/Execute/Transform.hs
AgeCommit message (Collapse)Author
2021-09-05Deprecate unused functions from the old executorEugen Wissner
2021-09-03Replace the old executorEugen 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-05-12Add location information to the intermediate treeEugen Wissner
2021-05-11Remove unused QueryError.TransformationErrorEugen Wissner
2021-03-14Add location information to list valuesEugen 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-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-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-07-20Draft the Validation APIEugen Wissner
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-11Parse subscriptionsEugen Wissner
2020-07-06Export sum type for all GraphQL typesEugen Wissner
2020-06-30Move Core module out of ASTEugen Wissner
2020-06-13Coerce resultEugen Wissner
Fixes #45.
2020-06-07Add description to the enum type valuesEugen Wissner
2020-06-06Coerce argument values properlyEugen Wissner
Fixes #44.
2020-05-29Define resolvers on type fieldsEugen Wissner
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-26Add Union and Interface type definitionsEugen Wissner
2020-05-25Split input/output types and values into 2 modulesEugen Wissner
2020-05-24Check pointEugen Wissner
2020-05-23Don't fail on invalid fragments and variablesEugen Wissner
2020-05-22Reject variables as default valuesEugen Wissner
2020-05-21Coerce variable valuesEugen Wissner
2020-01-01Rewrite argument list to argument mapEugen Wissner
2019-12-30Replace substitution function with a mapEugen Wissner
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-28Move AST to AST.DocumentEugen Wissner
2019-12-26Add definition moduleEugen Wissner
2019-12-25Replace AST.Selection data constructorsEugen Wissner
2019-12-18Move Execute.Directive to Type.DirectiveEugen Wissner
Just to roughly follow the structure of the reference implementation.
2019-12-07Move Transform to Language.GraphQL.ExecuteEugen Wissner
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.