Commit Graph

16 Commits

Author SHA1 Message Date
Danny Navarro
77853b17ae Merge branch 'all-improvements'
This adds general API documentation, a tutorial and error handling.
2016-03-15 14:02:34 +01:00
solrun
61d6af7778 Added documentation of functions and modules and included tutorial.lhs. 2016-03-14 01:42:55 +01:00
Matthías Páll Gissurarson
d195389102 Added exception handling with Alternative constraint according to spec. 2016-03-14 01:01:24 +01:00
Danny Navarro
d8a731fe30 Remove StringValue type 2016-02-22 13:59:38 +01:00
Danny Navarro
770df82718 Simplify Schema definition API
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.
2016-02-19 19:21:32 +01: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
a6b2fd297b Garden 2016-02-17 13:20:56 +01:00
Danny Navarro
98d2d41cda Initial support for variable substitution
The correspondent end-to-end test has been ported. The variable
definition still needs to be checked.
2016-02-15 14:43:52 +01:00
Danny Navarro
a088c81944 Handle Field arguments in Schema definition
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.
2016-02-12 12:51:18 +01:00
Danny Navarro
df8e43c9aa Handle Output enumerations in Schema definition
The third end-to-end test from graphql-js was implemented.
2016-02-09 13:31:28 +01:00
Danny Navarro
eca3c2d8d4 Generalize Maybe type constructor to any Monad
This allows schema definitions with side-effects for any type with a
Monadic/Alternative implementation like IO for example.
2016-01-30 12:29:49 +01:00
Danny Navarro
78e0d871d5 Garden 2016-01-26 13:38:02 +01:00
Danny Navarro
bb685c9afa Rough implementation of execute
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.
2016-01-26 12:43:18 +01:00
Danny Navarro
4e5dc3433a Implement first StarWars end-to-end test
`execute` still needs to be implemented.
2015-10-19 12:19:39 +02:00
Danny Navarro
3f30a44d1d Test fixtures for Schema toplevel
This includes simplications to the Schema data types.
2015-10-17 17:49:56 +02:00
Danny Navarro
8e3bae4b5c Initial stub for a GraphQL and execute 2015-10-17 13:23:49 +02:00