diff options
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | Data/GraphQL/AST.hs | 6 |
2 files changed, 8 insertions, 1 deletions
@@ -1 +1,4 @@ .stack-work/ +.cabal-sandbox/ +cabal.sandbox.config +dist/ diff --git a/Data/GraphQL/AST.hs b/Data/GraphQL/AST.hs index cc631e6..4140c9c 100644 --- a/Data/GraphQL/AST.hs +++ b/Data/GraphQL/AST.hs @@ -1,7 +1,8 @@ module Data.GraphQL.AST where import Data.Int (Int32) -import Data.Text (Text) +import Data.Text (Text, pack) +import Data.String -- * Name @@ -28,6 +29,9 @@ data VariableDefinition = VariableDefinition Variable Type (Maybe DefaultValue) newtype Variable = Variable Name deriving (Eq,Show) +instance IsString Variable where + fromString = Variable . pack + type SelectionSet = [Selection] data Selection = SelectionField Field |
