graphql-engine/docs/graphql/manual/queries/simple-object-queries.rst
2018-09-11 16:41:24 +05:30

39 lines
659 B
ReStructuredText

Simple object queries
=====================
You can fetch a single node or multiple nodes of the same type using a simple object query.
For example, fetch a list of authors:
.. graphiql::
:view_only:
:query:
query {
author {
id
name
}
}
:response:
{
"data": {
"author": [
{
"id": 1,
"name": "Justin"
},
{
"id": 2,
"name": "Beltran"
},
{
"id": 3,
"name": "Sidney"
},
{
"id": 4,
"name": "Anjela"
}
]
}
}