| Age | Commit message (Collapse) | Author |
|
... to distinguish between minified and pretty printing.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
The relevant test was restored too.
|
|
The main intention with this commit is to show a poor's man way to support type
instrospection.
|
|
Only field names are supported for now.
|
|
Also, temporarily remove error reporting to simplify execution. This should be
restored once the new execution model is nailed.
|
|
One AST is meant to be a target parser and tries to adhere as much as possible
to the spec. The other is a simplified version of that AST meant for execution.
Also newtypes have been replaced by type synonyms and NonEmpty lists are being
used where it makes sense.
|
|
The essential change hidden behind the code golfing is using the `tok`
combinator. This was making fail the Kitchen Sink test.
|
|
|
|
|
|
|
|
Also refactors some deplicate objects into a where clause
|
|
|
|
|
|
Now there is one `Resolver` type and the `Output` and `Scalar` types
have been removed. This should be closer to the final Schema definition
API.
|
|
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.
|
|
|
|
The test with invalid ID is commented out until proper exception
handling is implemented.
|
|
The correspondent end-to-end test has been ported. The variable
definition still needs to be checked.
|
|
|
|
|
|
The `Schema` has been overhauled to make `Output` monomorphic.
Traversing the `GraphQL` document is handled implicitly while defining
the `Schema`.
The 4th end-to-end test from `graphql-js` has been ported.
|
|
`Character` is now a synonym of the sum type of `Droid` and `Human`.
For now I don't see the need to implement GraphQL Schema interfaces with
type classes or lens. Plain Haskell ADTs should be good enough.
|
|
The third end-to-end test from graphql-js was implemented.
|
|
The second graphql-js end-to-end test was ported and passed
successfully.
|
|
|
|
This simplifies Attoparsec parsing when executing a GraphQL
query.
|
|
This allows schema definitions with side-effects for any type with a
Monadic/Alternative implementation like IO for example.
|
|
|
|
|
|
The first end-to-end test taken from `graphql-js` passes but this still
needs to be extended to support more general cases.
- `Data.GraphQL.Schema` has been heavily modified to support the
execution model. More drastic changes are expected in this module.
- When defining a `Schema` ordinary functions taking fields as input are
being used instead of maps. This makes the implementation of `execute`
easier, and, arguably, makes `Schema` definitions more *Haskellish*.
- Drop explicit `unordered-containers` dependency. `Aeson.Value`s and
field functions should be good enough for now.
|
|
`execute` still needs to be implemented.
|
|
This includes simplications to the Schema data types.
|
|
|
|
|
|
This also includes the fixes to make it work. Golden tests have been
removed.
|
|
|