I have been searching around for a while and been getting a lot of help from the SO community. But, it seems that the setup of my project isn't allowing normal queries such as sort, limit, filter, or others.
I am querying a custom middleware/drupal site.
Examples that throw errors:
{
umdHub(limit: 5) {
articles {
data {
id
title
subtitle
body
summary
}
}
}
}
or
{
umdHub(
sort: {
fields: [authorship_date___time]
order: ASC
}
) {
articles {
data {
id
title
subtitle
body
summary
authorship_date {
formatted_short
unix
unix_int
formatted_long
formatted_short
time
}
}
}
}
}
All return errors in http://localhost:8000/___graphql like:
{
"errors": [
{
"message": "Unknown argument \"limit\" on field \"umdHub\" of type \"Query\".",
"locations": [
{
"line": 2,
"column": 10
}
]
}
]
}
How can I resolve these issues?
Turns out this was the way to do it:
That because you don't have argument
limit
in on fieldumdHub
. To resolve, let's check your schema, on theumdHub
field of typeQuery
, and addlimit
arguments, then restart your server.Exemple: