Problem/Motivation
\Drupal\graphql_core_schema\Plugin\GraphQL\EntityQueryBase::buildFilterConditions() is not passing the correct operator to \Drupal\graphql_core_schema\Plugin\GraphQL\EntityQueryBase::isUnaryOperator(),\Drupal\graphql_core_schema\Plugin\GraphQL\EntityQueryBase::isRangeOperator() and \Drupal\graphql_core_schema\Plugin\GraphQL\EntityQueryBase::isNullOperator()
Steps to reproduce
Do the following graphql query on Drupal 11...
query SearchContent($limit: Int, $offset: Int, $sort: [EntityQuerySortInput!]) {
entityQuery(
entityType: NODE
filter: {conditions: [{field: "type", value: "article", operator: EQUAL}], groups: [], conjunction: AND}
sort: $sort
limit: $limit
offset: $offset
) {
items {
id
}
total
}
}
with the variables:
{
"limit": 10,
"offset": 0,
"sort": [
{
"field": "created",
"direction": "DESC"
}
]
}
Proposed resolution
Passed the mapped operator to these functions.
This is a critical bug because this breaks a site during a D10 to D11 upgrade due to a deprecation changing to an exception.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Issue fork graphql_core_schema-3515141
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
alexpottComment #4
alexpottThe test fail is unrelated to this issue and is fixed by #3515177: RouteTest::testResolveNode() in GraphQL Core Schema fails on HEAD
Comment #6
czigor commentedCommitted, thanks!