| Age | Commit message (Collapse) | Author |
|
This focused mainly on fragments.
|
|
|
|
In the Transform module the Full AST will converted to Core AST.
This commit also includes a partial implementation of Fragment replacement.
|
|
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.
|
|
The current parser will fail parsing floats because it parses an int,
and then stumbles on the dot.
To fix I interpret the value with the scientific library which already
is a dependency through attoparsec, so we're not introducing any extra
downloads or compiling.
I think this is still subtly wrong because "10.0" will be parsed as
ValueInt, but because input argument ints are allowed to be coerced
into doubles (according to the spec) this is probably acceptable.
|
|
|
|
This adds general API documentation, a tutorial and error handling.
|
|
|
|
|
|
|
|
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 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.
|
|
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 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.
|
|
|
|
- Add printing combinators to make code more readable.
- Optimize printing for encoding. Pretty printing will be in a different
module.
|
|
- Braces instead of parens for `inputValueDefinitions`.
- Rename `bool` -> `booleanValue`.
- Some code rearrangements.
|
|
This just typechecks. It needs to be cleaned and tested. Tests have been
deactivated.
|
|
Thanks to @swolchok for the suggestion.
|
|
|
|
This also includes a new type for Value String.
The tests fail now, although it parses successfully. I'll use a pretty
printer in next commit so that it's easier to spot the differences.
Onces this is working I'll add the rest of the escaped characters.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Add missing variable parsing.
- Reuse `name` in value string.
This parses successfully the `kitchen-sink.graphql` sample from
`graphql-js`.
|
|
They are less efficient but they are giving me issues because they don't
fail. Once this is working I'll look into optimizing.
Also disable skipping comments until I figure out how to skip both
comments and space at the same time.
|