When we build a query for a view using Search Api with Solr, we get an Internal Server Error.
For error #0: Error: Call to a member function id() on bool in Drupal\graphql_core_schema\Plugin\GraphQL\DataProducer\ViewExecutor->resolve() (line 195 of /app/docroot/modules/contrib/graphql_core_schema/src/Plugin/GraphQL/DataProducer/ViewExecutor.php)
#0 [internal function]: Drupal\graphql_core_schema\Plugin\GraphQL\DataProducer\ViewExecutor->resolve()
- Create an search api server using Solr
- Create an search api index
- Create a view using that search index
- Write a gql query in the graphql explorer
query {
entityById(entityType: VIEW, id: "search_content") {
... on View {
executable {
execute {
rows {
id
label
}
}
}
}
}
}
Add a check on the base entity type before assigning the id at this line of code, 195
$this->entityTypeId = $executable->getBaseEntityType()->id();
Fixed
1.0
Code