429 Commits

Author SHA1 Message Date
3d97b3e2ff Introduce Node data type to simplify OperationDefinition
Thanks to @swolchok for the suggestion.
2015-09-21 10:05:09 +02:00
88ca3d1866 Add errors for all parser Alternatives 2015-09-21 09:28:51 +02:00
899fa1b531 Handle escaped quotes for GraphQL String Values
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.
2015-09-18 18:11:11 +02:00
cb9977141d Golf 2015-09-18 16:29:40 +02:00
4f4e31805a Parse secure names 2015-09-18 15:43:22 +02:00
d88acf3d0e Refine numeric types 2015-09-18 15:02:51 +02:00
c9c1137ceb Garden 2015-09-18 14:55:59 +02:00
dac6721f02 Version bump and CHANGELOG v0.2.1 2015-09-16 11:16:16 +02:00
b3482172a6 Add travis support 2015-09-16 10:51:53 +02:00
f88948e801 Support ghc-7.8 2015-09-16 10:36:59 +02:00
ee0e0c3d1f Use Cabal data-files to access golden tests data
Fixes #1.
2015-09-16 10:13:44 +02:00
82a380079c Version bump, CHANGELOG and some gardening v0.2 2015-09-14 17:26:09 +02:00
7cf2b59331 Version bump, CHANGELOG and some gardening 2015-09-14 17:25:18 +02:00
dcd7b46a6d Convenient imports for ghci 2015-09-14 17:02:43 +02:00
8d81f43b61 Add golden test for kitchen-sink.graphql 2015-09-14 17:01:14 +02:00
b4b8388392 Enable warnings and take care of extra imports 2015-09-14 15:48:47 +02:00
ec018db73a Handle comments in whitespace 2015-09-14 15:43:09 +02:00
3084b188dd Update TODO 2015-09-14 14:32:46 +02:00
26e2372c5e Fix value parsing
- Add missing variable parsing.
- Reuse `name` in value string.

This parses successfully the `kitchen-sink.graphql` sample from
`graphql-js`.
2015-09-14 14:14:25 +02:00
c0b6fc8a05 Replace take... functions with many...
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.
2015-09-14 13:16:58 +02:00
62adfd89cd Several improvements to the parser
- Add token combinator to simplify whitespace handling.
- Simplify whiteSpace parsers.
- Add `optempty` to handle pure mempty cases. `empty /= pure mempty`.
- Use `between` combinators for brackets, braces and parens.

This also includes small adjustments to the AST.
2015-09-14 12:15:04 +02:00
b206079047 Add missing = required default values and unions 2015-09-13 17:44:31 +02:00
048ee552d8 Take care of comments 2015-09-13 15:34:01 +02:00
0e67fdc21c Add GraphQL parser
WIP: This parser just type checks, it hasn't even been tested manually.
Check new tasks in the TODO file and the TODO comments in the code for
more gotchas.
2015-09-13 13:55:15 +02:00
44a2ff4765 Minor adjustments in AST for easier parsing
Also `Maybe` wrappers removed. I don't think there needs to be a special
case for empty values vs no values at all.
2015-09-13 13:49:11 +02:00
97b99eb448 Add missing OperationDefinition Name 2015-09-12 15:44:30 +02:00
0f673b9b4d Rename module Data.GraphQL -> Data.GraphQL.AST 2015-09-12 15:16:28 +02:00
50a0c953d3 Garden v0.1 2015-09-12 13:09:06 +02:00
5af7136893 Initial commit
This includes a rough port of the data types at
https://github.com/graphql/graphql-js/blob/master/src/language/ast.js
2015-09-12 12:54:05 +02:00