This commit is contained in:
Danny Navarro 2016-01-26 13:38:02 +01:00
parent a70732a4b6
commit 78e0d871d5
5 changed files with 8 additions and 6 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
.cabal-sandbox/
cabal.sandbox.config
dist/
TAGS
.#*

View File

@ -1,8 +1,8 @@
module Data.GraphQL.AST where
import Data.Int (Int32)
import Data.String (IsString(fromString))
import Data.Text (Text, pack)
import Data.String
-- * Name
@ -39,9 +39,7 @@ data Selection = SelectionField Field
| SelectionInlineFragment InlineFragment
deriving (Eq,Show)
data Field = Field Alias Name [Argument]
[Directive]
SelectionSet
data Field = Field Alias Name [Argument] [Directive] SelectionSet
deriving (Eq,Show)
type Alias = Name

View File

@ -6,6 +6,8 @@ import Text.Show.Functions ()
import Data.Text (Text)
import Data.Aeson (ToJSON(toJSON))
-- TODO: Support side-effects
data Schema = Schema QueryRoot -- (Maybe MutationRoot)
type QueryRoot = Resolver

View File

@ -14,7 +14,7 @@ copyright: Copyright (C) 2015 J. Daniel Navarro
category: Web
build-type: Simple
cabal-version: >=1.10
tested-with: GHC == 7.8.4, GHC == 7.10.2
tested-with: GHC == 7.8.4, GHC == 7.10.3
extra-source-files: README.md CHANGELOG.md stack.yaml
data-files: tests/data/*.graphql
tests/data/*.min.graphql

View File

@ -28,6 +28,6 @@ ksTest = testCase "Kitchen Sink"
=<< getDataFileName "tests/data/kitchen-sink.min.graphql"
actual = either (error "Parsing error!") Encoder.document
<$> parseOnly Parser.document
. parseOnly Parser.document
<$> expected