Open roshni-addweb opened 4 years ago
Hi,
After enabling the rules module, GraphQL explorer does not work. In the logs it says missing current_path.
Current version is as below: Drupal Version: drupal 8.9.2 graphql: 8.x-3.0
did you fix it? I'm facing same issue
Facing the same issue. Any luck @roshni-addweb @leydisContre7777 ?
Drupal: 8.9.3 graphql: 8.x-3.0 php:7.3.18 rules: 8.x-3.0-alpha6
Also running into this when going to /graphql/explorer
. We've always had rules enabled and explorer was working last time I checked so cant say for sure if rules is the problem.
This is the error log:
LogicException: Missing type current_path. in Drupal\graphql\Plugin\GraphQL\Schemas\SchemaPluginBase->getType() (line 421 of /***/docroot/modules/contrib/graphql/src/Plugin/GraphQL/Schemas/SchemaPluginBase.php).
After uninstalling rules as a test, we end with a different error:
Missing type layout_section.
drupal/core : "8.9.3" drupal/graphql : "8.x-3.0" php : 7.2.33 drupal/rules : "8.x-3.0-alpha6"
The only thing that changed in my case is the drupal/core version, upgrading from Thunder 2 to 3 ( https://thunder.github.io/thunder-documentation/update-2-to-3 )
Fo me, disabling Rules was the solution.
drupal/core: 8.9.3 drupal/rules: 8.x-3.0-alpha6 drupal/graphql: 8.x-3.0
Also worked, I disabled rules 8.x-3.0-alpha6
. It's not a fix though.
This still seems to be an issue. Heres the stack trace that shows rules:
LogicException: Missing type current_path. in Drupal\graphql\Plugin\GraphQL\Schemas\SchemaPluginBase->getType() (line 421 of modules/contrib/graphql/src/Plugin/GraphQL/Schemas/SchemaPluginBase.php).
Drupal\graphql\Plugin\GraphQL\Schemas\SchemaPluginBase->processType('current_path') (Line: 61)
Drupal\graphql\Plugin\GraphQL\Fields\FieldPluginBase::createInstance(Object, Object, Array, 'context:current_path') (Line: 511)
Drupal\graphql\Plugin\GraphQL\Schemas\SchemaPluginBase->buildField(Array)
array_map(Array, Array) (Line: 442)
Drupal\graphql\Plugin\GraphQL\Schemas\SchemaPluginBase->processFields(Array) (Line: 346)
Drupal\graphql\Plugin\GraphQL\Schemas\SchemaPluginBase->getFields('Root') (Line: 221)
Drupal\graphql\Plugin\GraphQL\Schemas\SchemaPluginBase->Drupal\graphql\Plugin\GraphQL\Schemas\{closure}() (Line: 80)
GraphQL\Type\Definition\FieldDefinition::defineFieldMap(Object, Object) (Line: 124)
GraphQL\Type\Definition\ObjectType->getFields() (Line: 807)
GraphQL\Validator\Rules\OverlappingFieldsCanBeMerged->internalCollectFieldsAndFragmentNames(Object, Object, Object, Array, Array) (Line: 739)
GraphQL\Validator\Rules\OverlappingFieldsCanBeMerged->getFieldsAndFragmentNames(Object, Object, Object) (Line: 162)
GraphQL\Validator\Rules\OverlappingFieldsCanBeMerged->findConflictsWithinSelectionSet(Object, Object, Object) (Line: 71)
GraphQL\Validator\Rules\OverlappingFieldsCanBeMerged->GraphQL\Validator\Rules\{closure}(Object, 'selectionSet', Object, Array, Array)
call_user_func_array(Object, Array) (Line: 372)
GraphQL\Language\Visitor::GraphQL\Language\{closure}(Object, 'selectionSet', Object, Array, Array)
call_user_func_array(Object, Array) (Line: 426)
GraphQL\Language\Visitor::GraphQL\Language\{closure}(Object, 'selectionSet', Object, Array, Array)
call_user_func(Object, Object, 'selectionSet', Object, Array, Array) (Line: 251)
GraphQL\Language\Visitor::visit(Object, Array) (Line: 365)
Drupal\graphql\GraphQL\Execution\QueryProcessor->validateOperation(Object, Object, Object) (Line: 287)
Drupal\graphql\GraphQL\Execution\QueryProcessor->doExecuteOperation(Object, Object, Object, Object, 1) (Line: 241)
Drupal\graphql\GraphQL\Execution\QueryProcessor->executeCacheableOperation(Object, Object, Object, Object, 1) (Line: 204)
Drupal\graphql\GraphQL\Execution\QueryProcessor->executeOperation(Object, Object, Object, ) (Line: 149)
Drupal\graphql\GraphQL\Execution\QueryProcessor->executeOperationWithReporting(Object, Object, Object, ) (Line: 120)
Drupal\graphql\GraphQL\Execution\QueryProcessor->executeSingle(Object, Object) (Line: 109)
Drupal\graphql\GraphQL\Execution\QueryProcessor->processQuery('default:default', Object) (Line: 38)
Drupal\graphql\GraphQL\Utility\Introspection->introspect('default:default') (Line: 81)
Drupal\graphql\Controller\ExplorerController->viewExplorer('default:default', Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 49)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Confirming that uninstalling Rules "fixes" the issue for me.
drupal/core: 8.9.6 drupal/rules: 8.x-3.0.0-alpha6 drupal/graphql: 8.x-3.0.0
Found this Rules issue: https://www.drupal.org/project/rules/issues/3161036 which led me to https://www.drupal.org/project/domain/issues/3160515#comment-13851357 which looks like it may be related to this.
I was able to get explorer working again with suggestions in that issue, however, not an actual solution yet so just linking here for reference.
Hi,
Is there any solution on this without uninstalling rules module?
Hi,
After enabling the rules module, GraphQL explorer does not work. In the logs it says missing current_path.
Current version is as below: Drupal Version: drupal 8.9.2 graphql: 8.x-3.0