Merge pull request #2 from timmytofu/isstring-variable
`IsString` variable and .gitignore
This commit is contained in:
commit
c8f629e826
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,4 @@
|
|||||||
.stack-work/
|
.stack-work/
|
||||||
|
.cabal-sandbox/
|
||||||
|
cabal.sandbox.config
|
||||||
|
dist/
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
module Data.GraphQL.AST where
|
module Data.GraphQL.AST where
|
||||||
|
|
||||||
import Data.Int (Int32)
|
import Data.Int (Int32)
|
||||||
import Data.Text (Text)
|
import Data.Text (Text, pack)
|
||||||
|
import Data.String
|
||||||
|
|
||||||
-- * Name
|
-- * Name
|
||||||
|
|
||||||
@ -28,6 +29,9 @@ data VariableDefinition = VariableDefinition Variable Type (Maybe DefaultValue)
|
|||||||
|
|
||||||
newtype Variable = Variable Name deriving (Eq,Show)
|
newtype Variable = Variable Name deriving (Eq,Show)
|
||||||
|
|
||||||
|
instance IsString Variable where
|
||||||
|
fromString = Variable . pack
|
||||||
|
|
||||||
type SelectionSet = [Selection]
|
type SelectionSet = [Selection]
|
||||||
|
|
||||||
data Selection = SelectionField Field
|
data Selection = SelectionField Field
|
||||||
|
Loading…
Reference in New Issue
Block a user