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/
cabal.sandbox.config cabal.sandbox.config
dist/ dist/
TAGS
.#*

View File

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

View File

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

View File

@ -14,7 +14,7 @@ copyright: Copyright (C) 2015 J. Daniel Navarro
category: Web category: Web
build-type: Simple build-type: Simple
cabal-version: >=1.10 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 extra-source-files: README.md CHANGELOG.md stack.yaml
data-files: tests/data/*.graphql data-files: tests/data/*.graphql
tests/data/*.min.graphql tests/data/*.min.graphql

View File

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