Last active
August 31, 2020 23:03
-
-
Save cesarmiquel/8d6da994156d7130161191499e7e64e6 to your computer and use it in GitHub Desktop.
GraphQL - Drupal - Node query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Query published nodes of type article | |
# | |
query { | |
nodeQuery( | |
filter:{ | |
conditions:[ | |
{field:"type", value:"article"}, | |
{field:"status", value: "1"} | |
] | |
}, | |
sort:{field:"created", direction:DESC}, | |
limit: 5 | |
) { | |
entities{ | |
... on NodeArticle{ | |
id:entityId | |
title | |
promote | |
changed | |
created | |
thumbnail: fieldVideoPlaceholder { | |
image:entity { | |
... on MediaImage { | |
fieldMediaImage{ | |
thumbnail: derivative(style:_11MAX164PX) { | |
url | |
} | |
} | |
} | |
} | |
} | |
entityUrl { | |
path | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment