diff options
| author | Danny Navarro <j@dannynavarro.net> | 2015-09-26 09:23:46 +0200 |
|---|---|---|
| committer | Danny Navarro <j@dannynavarro.net> | 2015-09-26 09:23:46 +0200 |
| commit | c8f629e8268cbd54f026b3e3d0765d9cfe655fec (patch) | |
| tree | 5208f8b2e475ccb9b503dbcd073526c38cfc11be /Data | |
| parent | 6ce2004264fe73bdcfbc8a4a19de659266442cb2 (diff) | |
| parent | 85941139c19348de2876f9376bb886d0ebd2eb50 (diff) | |
| download | graphql-c8f629e8268cbd54f026b3e3d0765d9cfe655fec.tar.gz | |
Merge pull request #2 from timmytofu/isstring-variable
`IsString` variable and .gitignore
Diffstat (limited to 'Data')
| -rw-r--r-- | Data/GraphQL/AST.hs | 6 |
1 files changed, 5 insertions, 1 deletions
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 |
