- Issue created by @justclint
When querying languages with the 'direction' option results with an error message.
{
"errors": [
{
"message": "Internal server error",
"extensions": {
"category": "internal"
},
"locations": [
{
"line": 8,
"column": 9
}
],
"path": [
"entityQuery",
"items",
0,
"direction"
]
},
1. Enable entity type `configurable_language (Language)`
2. Go to explorer and query languages with direction.
query MyQuery {
entityQuery(entityType: CONFIGURABLE_LANGUAGE) {
total
items {
... on ConfigurableLanguage {
id
name
direction
}
}
}
}
Per https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Language%... getDirection() returns a string.
Change direction: Int! to direction: String! in /graphql/core/LanguageInterface.graphqls.
This will give expected result:
{
"data": {
"entityQuery": {
"total": 31,
"items": [
{
"id": "ar",
"name": "Arabic",
"direction": "ltr"
},
{
"id": "cs",
"name": "Czech",
"direction": "ltr"
},
{
"id": "da",
"name": "Danish",
"direction": "ltr"
},
Active
1.0
Code