- Issue created by @pradeepjha
- ๐ฎ๐ณIndia pradeepjha
It's breaking our prod site when GraphQL suddenly stops giving response. Lower environment it looks good. That's why increasing priority.
- ๐บ๐ธUnited States cruno NJ
Confirming that this is an issue we are also experiencing. We use graphql_compose to generate schema.
- ๐ฌ๐งUnited Kingdom james.south
I need to debug further but I'm observing the same behaviour on a site with GraphQL 8.x-4.9 and GraphQL Compose 2.2.1.
In our case all queries fail until the cache is rebuilt (a single cache clear consistently fixes the issue temporarily). Issue is sporadic and we haven't identified a consistent trigger for it.
- ๐ฎ๐ณIndia shabana.navas
We're running GraphQL 8.x-4.8 and are seeing the same issue w/ GraphQL queries not working after each deploy to production. We don't use GraphQL Compose.
A query to get the Commerce Orders in the GraphQL explorer, returns errors like this:
{ "errors": [ { "message": "Cannot query field \u0022derivative\u0022 on type \u0022FieldItemTypeImage\u0022.", "extensions": { "category": "graphql" }, "locations": [ { "line": 88, "column": 25 } ] }, { "message": "Cannot query field \u0022derivative\u0022 on type \u0022FieldItemTypeImage\u0022.", "extensions": { "category": "graphql" }, "locations": [ { "line": 121, "column": 25 } ] }, ...
After clearing cache a couple of more times, it starts working again.
- ๐ง๐ชBelgium matthieu_collet
Any update on this error ?
We suddenly have it too since this morning, our production site is broken, and clear cache doesn't solve anything :( - ๐ง๐ชBelgium davidiio
Hello,
We face the same issue here once with an apdated site (we restored backups to make it work again) and now we face it with a new dev website with Drupal 11.1.5 and GraphQL 8.x-4.11 and Graphql_compose 2.3.0.
We noticed this error GraphQL\Error\SyntaxError : Syntax Error: Cannot parse the unexpected character "\uc9". dans GraphQL\Language\Lexer->readToken()
And realized that this bug happend only after translation updates, if we revert our prod site, enable a new module that updates translation we have this bug again.
Are any of you using multilingual sites? Maybe this is a lead to find out what is wrong here? - ๐ง๐ชBelgium davidiio
After some disabling and enabling of graphQL and GraphQL Compose and returning to the explorer page between modifications we also notice that unticking the "Enable Singuliarize" checkbox in the "String inflector" tab of graphql_compose settings produces the same bug.
Maybe this issue is a graphql_compose issue and not a graphql issue. - ๐จ๐ทCosta Rica esteban.arias
Heya everyone,
If you are using graphql while also using memcache as your default cache backend, please introduce these lines to your settings:
$settings['cache']['bins']['graphql_ast'] = 'cache.backend.database';
$settings['cache']['bins']['graphql_results'] = 'cache.backend.database';This should let graphql use the database tables for caching purposes which seems to make the random issues go away.
I didn't find this fix by myself but got permission to share it to the community.
Hope this helps!
- ๐ฆ๐บAustralia almunnings Melbourne, ๐ฆ๐บ
Looks like the changes in ๐ Cache collision when multiple servers are using the same schema plugin Active are breaking.
web/modules/contrib/graphql/src/Plugin/GraphQL/Schema/SdlSchemaPluginBase.php
Method:
getCacheId
$this->getConfiguration()['server_id']
is not always set. It's weirdly only sometimes set?It looks like its set in the server and not the schema?
Full ID returned:
full:graphql_compose:my_server
- /admin/config/graphql/servers/manage/core_graphql/explorer
- /admin/config/graphql/servers/manage/core_graphql/voyagerPartial ID returned:
full:graphql_compose
- /admin/config/graphql/servers/manage/core_graphql/validateSomethings not right or I'm missing something here.
Is it an order or operation or missing data? - ๐ฆ๐บAustralia almunnings Melbourne, ๐ฆ๐บ
I'm unsure, quick check and maybe this was missed, and it fixes the issue?
$cid = $this->getCacheId('schema');
forweb/modules/contrib/graphql/src/Plugin/GraphQL/Schema/AlterableComposableSchema.php
- @almunnings opened merge request.
- ๐ฆ๐บAustralia almunnings Melbourne, ๐ฆ๐บ
Side note: I still feel like it a bandaid on the symptom, and it's still going to be getting that deprecated in getCacheId, all we're doing is separating the caches by adding in the getCacheId again.
Seeing the same issue on a site with translation, also using compose, truncating the cache tables seem to be the only fix.
Explorer shows none of the schema, but just found if I can to graphql compose and save configuration it fixes the issue, so seems like it more likely a compose issue
- ๐ฆ๐บAustralia almunnings Melbourne, ๐ฆ๐บ
Compose nukes all GraphQL caches on save. That could be what youโre seeing.