summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL.hs
AgeCommit message (Collapse)Author
2023-02-26Remove JSON support in the core packageEugen Wissner
2022-12-24Fix GHC 9.2 warnings and deprecationsEugen Wissner
- Fix GHC 9.2 warnings - Convert comments to proper deprecations
2022-06-30Document usage of the json flagEugen Wissner
2022-01-20Add back graphql function, but jsonlessEugen Wissner
2021-12-24Put JSON support behind a flagEugen Wissner
2020-09-28Validate arguments are definedEugen 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-07-20Draft the Validation APIEugen Wissner
2020-07-19Return a stream as well from graphql* functionsEugen 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-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-08Return parser error location in a listEugen Wissner
An error can have multiple locations which are returned in a listt with key "locations".
2020-07-05Handle errors using custom typesEugen Wissner
Fixes #32.
2020-06-03Resolve abstract typesEugen Wissner
Objects that can be a part of an union or interface should return __typename as string.
2020-05-21Coerce variable valuesEugen Wissner
2020-05-14Add basic output object type supportEugen Wissner
2020-05-10Separate Query and Mutation resolversEugen Wissner
Fixes #33 .
2020-02-01Replace MonadIO constraint with just MonadEugen Wissner
And make the tests use Identity instead of IO.
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-11-03Move related modules to Language.GraphQL.ASTEugen Wissner
Fixes #18. - `Language.GraphQL.Encoder` moved to `Language.GraphQL.AST.Encoder`. - `Language.GraphQL.Parser` moved to `Language.GraphQL.AST.Parser`. - `Language.GraphQL.Lexer` moved to `Language.GraphQL.AST.Lexer`. - All `Language.GraphQL.AST.Value` data constructor prefixes were removed. The module should be imported qualified. - All `Language.GraphQL.AST.Core.Value` data constructor prefixes were removed. The module should be imported qualified. - `Language.GraphQL.AST.Transform` is now isn't exposed publically anymore.
2019-08-30Deprecate Language.GraphQL.Execute.SchemaEugen Wissner
It is not a schema (at least not a complete one), but a resolver list, and the resolvers should be provided by the user separately, because the schema can originate from a GraphQL document. Schema name should be free to provide a data type for the real schema later.
2019-07-19Report parse errors with line and column numbersEugen Wissner
2019-07-14Make all exports explicitEugen Wissner
2019-07-08Constrain the resolvers with MonadIOEugen Wissner
This replaces the most usages of MonadPlus, which is not appropriate for the resolvers, since a resolver is unambiguously chosen by the name (no need for 'mplus'), and the resolvers are often doing IO.
2019-07-07Change the main namespace to Language.GraphQLEugen Wissner