Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
This is the AST meant to be executed.
Documentation
Alternative field name.
{ smallPic: profilePic(size: 64) bigPic: profilePic(size: 1024) }
Here "smallPic" and "bigPic" are aliases for the same field, "profilePic", used to distinquish between profile pictures with different arguments (sizes).
Single argument.
{ user(id: 4) { name } }
Here "id" is an argument for the field "user" and its value is 4.
A single GraphQL field.
Only required property of a field, is its name. Optionally it can also have an alias, arguments or a list of subfields.
Given the following query:
{ zuck: user(id: 4) { id name } }
- "user", "id" and "name" are field names.
- "user" has two subfields, "id" and "name".
- "zuck" is an alias for "user". "id" and "name" have no aliases.
- "id: 4" is an argument for "name". "id" and "name don't have any arguments.
data ObjectField Source #
Key-value pair.
A list of ObjectField
s represents a GraphQL object type.
Instances
Eq ObjectField Source # | |
Defined in Language.GraphQL.AST.Core (==) :: ObjectField -> ObjectField -> Bool # (/=) :: ObjectField -> ObjectField -> Bool # | |
Show ObjectField Source # | |
Defined in Language.GraphQL.AST.Core showsPrec :: Int -> ObjectField -> ShowS # show :: ObjectField -> String # showList :: [ObjectField] -> ShowS # |
GraphQL has 3 operation types: queries, mutations and subscribtions.
Currently only queries and mutations are supported.
Represents accordingly typed GraphQL values.
ValueInt Int32 | |
ValueFloat Double | |
ValueString Text | |
ValueBoolean Bool | |
ValueNull | |
ValueEnum Name | |
ValueList [Value] | |
ValueObject [ObjectField] |