Skip to main content

Combining Arguments

For the sake of the following examples, let's consider a scenario where a table called Posts exists, having expected fields and relations like title, body, author, etc.

Using multiple arguments in queries‚Äč

More than one argument can get used in a single list query.

query {
postsList(filter: {
title: {
contains: "Possum"
}
},
sort: {
title: ASC
},
first: 2,
skip: 0
) {
items {
title
createdAt
author {
name
}
}
}
}
{
"data": {
"postsList": {
"items": [
{
"title": "Awesome Possum",
"createdAt": "2019-09-04T22:11:18.493Z",
"author": {
"name": "Huxley"
}
},
{
"title": "Everybody Loves Possum",
"createdAt": "2019-09-04T22:26:19.045Z",
"author": {
"name": "Stevens"
}
}
]
}
}
}
on this page
Was this article useful?
89% of our users said this content was useful.