forked from OSS/graphql
Adds IsString instance to Variable for easier REPL playing
This commit is contained in:
parent
0848e65da2
commit
85941139c1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user