Skip to content

Instantly share code, notes, and snippets.

@matezito
Last active August 25, 2021 11:44
Show Gist options
  • Save matezito/fc6d2a446cf7b8beb79ba09aa65aedbb to your computer and use it in GitHub Desktop.
Save matezito/fc6d2a446cf7b8beb79ba09aa65aedbb to your computer and use it in GitHub Desktop.
Querys Presentación
"""
AllPosts
query - Iniciamos la consulta
PostsAll - Nombramos nuestra consulta para poder agrupar de ser necesario
posts - Entidad que consultamos
edges - Ayudan a definir partes de la query, podemos tener varios y ayudan con la paginación
node - un grupo o nodo de datos
"""
query PostsAll {
posts {
edges {
node {
id
title
featuredImage {
node {
sourceUrl
}
}
}
}
}
}
{
"data": {
"posts": {
"edges": [
{
"node": {
"id": "cG9zdDoxMDc=",
"title": "1 – Quia aperiam dolore ipsum",
"featuredImage": {
"node": {
"sourceUrl": "http://next.test/wp-content/uploads/2021/08/ff15d92c-aca7-33bc-8b37-3843fd3b40ab.jpg"
}
}
}
},
{
"node": {
"id": "cG9zdDo5MA==",
"title": "Quo pariatur illo fugiat eaque sit",
"featuredImage": {
"node": {
"sourceUrl": "http://next.test/wp-content/uploads/2021/08/2e4cf5d9-2d23-319c-bcd8-92cf824a7dc6.jpg"
}
}
}
},
{
"node": {
"id": "cG9zdDoxMTM=",
"title": "Voluptas voluptatum quibusdam voluptates sint alias rerum",
"featuredImage": {
"node": {
"sourceUrl": "http://next.test/wp-content/uploads/2021/08/42a506e1-f3f7-3462-9a2d-5e86025d380c.jpg"
}
}
}
},
{
"node": {
"id": "cG9zdDoxMDQ=",
"title": "Id rerum consequatur nisi cupiditate enim voluptatem",
"featuredImage": {
"node": {
"sourceUrl": "http://next.test/wp-content/uploads/2021/08/aa6d77e2-31ee-3bdb-921e-c6f218f7d18f.jpg"
}
}
}
},
{
"node": {
"id": "cG9zdDoxMTE=",
"title": "Quia minima delectus corrupti",
"featuredImage": {
"node": {
"sourceUrl": "http://next.test/wp-content/uploads/2021/08/fe4d6f57-1511-36eb-8eed-6f10ea473d69.jpg"
}
}
}
},
{
"node": {
"id": "cG9zdDoxMDk=",
"title": "Suscipit beatae dolore alias",
"featuredImage": {
"node": {
"sourceUrl": "http://next.test/wp-content/uploads/2021/08/71229106-150c-3f9e-bd38-d596166b35a4.jpg"
}
}
}
},
{
"node": {
"id": "cG9zdDo5Mw==",
"title": "Omnis odit hic iure nesciunt voluptas",
"featuredImage": {
"node": {
"sourceUrl": "http://next.test/wp-content/uploads/2021/08/b87b2227-33e9-3ddf-90ac-9d9f85702ad8.jpg"
}
}
}
},
{
"node": {
"id": "cG9zdDo5OA==",
"title": "Rerum fugit fugit quae",
"featuredImage": {
"node": {
"sourceUrl": "http://next.test/wp-content/uploads/2021/08/005d12d8-4a6d-3b49-b7ff-969c96326d46.jpg"
}
}
}
},
{
"node": {
"id": "cG9zdDoxMDI=",
"title": "Nostrum iusto et dicta eius",
"featuredImage": {
"node": {
"sourceUrl": "http://next.test/wp-content/uploads/2021/08/3ed699c5-470e-3888-b8e7-50ebe29b4a31.jpg"
}
}
}
},
{
"node": {
"id": "cG9zdDo5Ng==",
"title": "Ea voluptas dolore ut",
"featuredImage": {
"node": {
"sourceUrl": "http://next.test/wp-content/uploads/2021/08/7e11f077-25f4-329d-85c6-6059d6cd30a1.jpg"
}
}
}
}
]
}
},
"extensions": {
"debug": [
{
"type": "DEBUG_LOGS_INACTIVE",
"message": "GraphQL Debug logging is not active. To see debug logs, GRAPHQL_DEBUG must be enabled."
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment