summaryrefslogtreecommitdiff
path: root/Data/GraphQL/Schema.hs
diff options
context:
space:
mode:
authorDanny Navarro <j@dannynavarro.net>2016-02-17 13:13:01 +0100
committerDanny Navarro <j@dannynavarro.net>2016-02-17 13:20:56 +0100
commita6b2fd297b01a4d7a9e4ea6fc73e21150c1259b9 (patch)
tree02e2fd2bcfb060faee7b683a082e8034e3ae4fc2 /Data/GraphQL/Schema.hs
parent7131d1c142dc9c9fc5331ee3ebf90cf9154f85d9 (diff)
downloadgraphql-a6b2fd297b01a4d7a9e4ea6fc73e21150c1259b9.tar.gz
Garden
Diffstat (limited to 'Data/GraphQL/Schema.hs')
-rw-r--r--Data/GraphQL/Schema.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Data/GraphQL/Schema.hs b/Data/GraphQL/Schema.hs
index 8d63696..4ec3748 100644
--- a/Data/GraphQL/Schema.hs
+++ b/Data/GraphQL/Schema.hs
@@ -10,7 +10,7 @@ import Data.Aeson (ToJSON(toJSON))
import Data.HashMap.Strict (HashMap)
import Data.Text (Text, pack)
-data Schema f = Schema (QueryRoot f) -- (Maybe MutationRoot)
+data Schema f = Schema (QueryRoot f)
type QueryRoot f = Resolver f
@@ -21,8 +21,6 @@ data Output = OutputObject (HashMap Text Output)
| OutputScalar Scalar
| OutputEnum Text
deriving (Show)
- -- | OutputUnion [Output]
- -- | OutputNonNull (Output)
type Argument = (Text, Scalar)
@@ -31,7 +29,7 @@ type Subs = Text -> Maybe Scalar
data Input = InputField Text [Argument] [Input]
deriving (Show)
--- TODO: Make ScalarInt Int32
+-- TODO: GraphQL spec for Integer Scalar is 32bits
data Scalar = ScalarInt Int
| ScalarFloat Double
| ScalarString Text
@@ -40,7 +38,7 @@ data Scalar = ScalarInt Int
deriving (Show)
instance IsString Scalar where
- fromString = ScalarString . pack
+ fromString = ScalarString . pack
instance ToJSON Scalar where
toJSON (ScalarInt x) = toJSON x