Problem/Motivation
After composer update, GraphQL server stops working, with error:
`Syntax Error: Invalid number, expected digit but got: "N"`
In GraphQL Server, editing the Server with GraphQL Compose, and visiting tabs "Explorer" or "Voyager" doesn't work, with the same error as above. The "Validation" tab displays `Invalid number, expected digit but got: "N"`
However, changing the GraphQL Server Schema to "Composable Schema" allows to visit tabs "Explorer" and "Voyager" (although without data, as I don't have a manual "Composable Schema".
(Note: seems like the webonyx-php Explorer has changed, as its layout is very different from before)
I'm guessing that there was a change on the Schema, and that the "GraphQL Compose schema" needs some adjustment?
It can also be a bug from Drupal GraphQL module itself, but I'm not really sure, as changing the above seems to touch the issue.
The full error, as displayed on Drupal Log Messages:
GraphQL\Error\SyntaxError: Syntax Error: Invalid number, expected digit but got: "N" in GraphQL\Language\Lexer->readDigits() (line 439 of /vendor/webonyx/graphql-php/src/Language/Lexer.php).
Location:
https://[domain]/en/admin/config/graphql/servers/manage/graphql_compose_server/explorer
Referer:
https://[domain]/en/admin/config/graphql/servers/manage/graphql_compose_server?destination=/en/admin/config/graphql
Backtrace:
#0 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Lexer.php(381): GraphQL\Language\Lexer->readDigits()
#1 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Lexer.php(266): GraphQL\Language\Lexer->readNumber()
#2 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Lexer.php(124): GraphQL\Language\Lexer->readToken()
#3 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Lexer.php(116): GraphQL\Language\Lexer->lookahead()
#4 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(361): GraphQL\Language\Lexer->advance()
#5 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(463): GraphQL\Language\Parser->expect()
#6 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(1454): GraphQL\Language\Parser->parseName()
#7 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(1438): GraphQL\Language\Parser->parseEnumValueDefinition()
#8 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(448): GraphQL\Language\Parser->GraphQL\Language\{closure}()
#9 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(1435): GraphQL\Language\Parser->many()
#10 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(1417): GraphQL\Language\Parser->parseEnumValuesDefinition()
#11 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(1110): GraphQL\Language\Parser->parseEnumTypeDefinition()
#12 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(524): GraphQL\Language\Parser->parseTypeSystemDefinition()
#13 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(484): GraphQL\Language\Parser->parseDefinition()
#14 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(450): GraphQL\Language\Parser->GraphQL\Language\{closure}()
#15 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(481): GraphQL\Language\Parser->many()
#16 /var/www/vhosts/[projectFolder]/[domain]/vendor/webonyx/graphql-php/src/Language/Parser.php(192): GraphQL\Language\Parser->parseDocument()
#17 /var/www/vhosts/[projectFolder]/[domain]/web/modules/contrib/graphql/src/Plugin/GraphQL/Schema/AlterableComposableSchema.php(136): GraphQL\Language\Parser::parse()
#18 /var/www/vhosts/[projectFolder]/[domain]/web/modules/contrib/graphql/src/Plugin/GraphQL/Schema/SdlSchemaPluginBase.php(123): Drupal\graphql\Plugin\GraphQL\Schema\AlterableComposableSchema->getSchemaDocument()
#19 /var/www/vhosts/[projectFolder]/[domain]/web/modules/contrib/graphql/src/Entity/Server.php(253): Drupal\graphql\Plugin\GraphQL\Schema\SdlSchemaPluginBase->getSchema()
#20 /var/www/vhosts/[projectFolder]/[domain]/web/modules/contrib/graphql/src/Entity/Server.php(199): Drupal\graphql\Entity\Server->configuration()
#21 /var/www/vhosts/[projectFolder]/[domain]/web/modules/contrib/graphql/src/GraphQL/Utility/Introspection.php(27): Drupal\graphql\Entity\Server->executeOperation()
#22 /var/www/vhosts/[projectFolder]/[domain]/web/modules/contrib/graphql/src/Controller/ExplorerController.php(87): Drupal\graphql\GraphQL\Utility\Introspection->introspect()
#23 [internal function]: Drupal\graphql\Controller\ExplorerController->viewExplorer()
#24 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#25 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#26 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#27 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#28 /var/www/vhosts/[projectFolder]/[domain]/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#29 /var/www/vhosts/[projectFolder]/[domain]/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#30 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#31 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#32 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#33 /var/www/vhosts/[projectFolder]/[domain]/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle()
#34 /var/www/vhosts/[projectFolder]/[domain]/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#35 /var/www/vhosts/[projectFolder]/[domain]/vendor/asm89/stack-cors/src/Cors.php(53): Drupal\page_cache\StackMiddleware\PageCache->handle()
#36 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Asm89\Stack\Cors->handle()
#37 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#38 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#39 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#40 /var/www/vhosts/[projectFolder]/[domain]/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#41 /var/www/vhosts/[projectFolder]/[domain]/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#42 {main}
Steps to reproduce
Update Drupal to 10.3.1, GraphQL Compose to 2.1.1, Drupal Graphql to 4.8
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes