Commit Graph

11 Commits

Author SHA1 Message Date
67bebf853c Replace MonadIO constraint with just Monad
And make the tests use Identity instead of IO.
2020-02-01 20:46:35 +01:00
73fc334bf8 Move related modules to Language.GraphQL.AST
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-11-03 11:00:18 +01:00
63d4de485d Deprecate enum, enumA, wrappedEnum, wrappedEnumA
These functions are from Language.GraphQL.Schema.
There are actually only two generic types in GraphQL: Scalars and objects.
Enum is a scalar value. According to the specification enums may be
serailized to strings. And in the current implementation they used
untyped strings anyway, so there is no point to have differently named
functions with the same implementation as their scalar counterparts.
2019-09-01 03:16:27 +02:00
f3b8d9b74c Make all exports explicit 2019-07-14 05:58:05 +02:00
61879fb124 Constrain the resolvers with MonadIO
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-08 10:15:47 +02:00
91679650b5 Introduce monad transformer for resolvers
Now the errors in the resolvers can be handled and 3 tests throwing
errors pass now. Another test fail but it requires distinguisching
nullable and non-nullable values.
2019-07-02 20:07:26 +02:00
Danny Navarro
285ccb0af9
Implement type instrospection tests
The main intention with this commit is to show a poor's man way to support type
instrospection.
2017-03-01 17:04:13 -03:00
Danny Navarro
aa66236081
Add homePlanet to test schema 2016-12-18 11:43:45 -03:00
Pweaver (Paul Weaver)
a6c0d63049 add tests for errors in queries for queries in starwars tests 2016-07-08 18:10:14 -04:00
Danny Navarro
8ee50727bd Overhaul Schema DSL
Aside of making the definition of Schemas easier, it takes care of
issues like nested aliases which previously wasn't possible. The naming
of the DSL functions is still provisional.
2016-02-18 13:49:02 +01:00
Danny Navarro
04d8d40b3a Split StarWars tests in different modules 2016-02-12 13:27:46 +01:00