statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
3.7k stars 508 forks source link

GraphQL GridItemType on User Blueprint not registered #6758

Closed buffalom closed 8 months ago

buffalom commented 1 year ago

Bug description

A grid fieldtype on a user blueprint does not register itself as a GraphQL type and therefore results in an error Type GridItem_History not found.

I assume the TypeRegistrar does not tell the UserInterface to register all types.

How to reproduce

I created a field named "history" with type grid on the user blueprint. When I open localhost/cp/graphiql the error Type GridItem_History not found. is logged and the application breaks.

If this does not work for you: I registered the GraphQL schema mysqlf according to the Statamic docs.

The issue is resolved, as soon as I register the type myself:

GraphQL::addType(new GridItemType(Blueprint::find('user')->field('history')->fieldtype(), 'GridItem_History'));

Logs

[2022-09-21 12:06:34] local.ERROR: Type GridItem_History not found.
Check that the config array key for the type matches the name attribute in the type's class.
It is required when 'lazyload_types' is enabled {"userId":"8a9ede8b-f2ed-480e-a2ea-30054954c629","exception":"[object] (Rebing\\GraphQL\\Exception\\TypeNotFound(code: 0): Type GridItem_History not found.
Check that the config array key for the type matches the name attribute in the type's class.
It is required when 'lazyload_types' is enabled at /var/www/html/vendor/rebing/graphql-laravel/src/GraphQL.php:250)
[stacktrace]
#0 /var/www/html/vendor/rebing/graphql-laravel/src/GraphQL.php(226): Rebing\\GraphQL\\GraphQL->getType()
#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): Rebing\\GraphQL\\GraphQL->type()
#2 /var/www/html/vendor/statamic/cms/src/GraphQL/Manager.php(36): Illuminate\\Support\\Facades\\Facade::__callStatic()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): Statamic\\GraphQL\\Manager->type()
#4 /var/www/html/vendor/statamic/cms/src/Fieldtypes/Grid.php(213): Illuminate\\Support\\Facades\\Facade::__callStatic()
#5 /var/www/html/vendor/statamic/cms/src/Fields/Field.php(404): Statamic\\Fieldtypes\\Grid->toGqlType()
#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(60): Statamic\\Fields\\Field->toGql()
#7 [internal function]: Illuminate\\Support\\HigherOrderCollectionProxy->Illuminate\\Support\\{closure}()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(560): array_map()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(719): Illuminate\\Support\\Arr::map()
#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(61): Illuminate\\Support\\Collection->map()
#11 /var/www/html/vendor/statamic/cms/src/Fields/Fields.php(300): Illuminate\\Support\\HigherOrderCollectionProxy->__call()
#12 /var/www/html/vendor/statamic/cms/src/GraphQL/Types/UserType.php(19): Statamic\\Fields\\Fields->toGql()
#13 /var/www/html/vendor/rebing/graphql-laravel/src/Support/Type.php(78): Statamic\\GraphQL\\Types\\UserType->fields()
#14 /var/www/html/vendor/rebing/graphql-laravel/src/Support/Type.php(114): Rebing\\GraphQL\\Support\\Type->getFields()
#15 /var/www/html/vendor/webonyx/graphql-php/src/Type/Definition/FieldDefinition.php(97): Rebing\\GraphQL\\Support\\Type->Rebing\\GraphQL\\Support\\{closure}()
#16 /var/www/html/vendor/webonyx/graphql-php/src/Type/Definition/TypeWithFields.php(26): GraphQL\\Type\\Definition\\FieldDefinition::defineFieldMap()
#17 /var/www/html/vendor/webonyx/graphql-php/src/Type/Definition/TypeWithFields.php(53): GraphQL\\Type\\Definition\\TypeWithFields->initializeFields()
#18 /var/www/html/vendor/webonyx/graphql-php/src/Validator/Rules/OverlappingFieldsCanBeMerged.php(255): GraphQL\\Type\\Definition\\TypeWithFields->hasField()
#19 /var/www/html/vendor/webonyx/graphql-php/src/Validator/Rules/OverlappingFieldsCanBeMerged.php(165): GraphQL\\Validator\\Rules\\OverlappingFieldsCanBeMerged->internalCollectFieldsAndFragmentNames()
#20 /var/www/html/vendor/webonyx/graphql-php/src/Validator/Rules/OverlappingFieldsCanBeMerged.php(96): GraphQL\\Validator\\Rules\\OverlappingFieldsCanBeMerged->getFieldsAndFragmentNames()
#21 /var/www/html/vendor/webonyx/graphql-php/src/Validator/Rules/OverlappingFieldsCanBeMerged.php(64): GraphQL\\Validator\\Rules\\OverlappingFieldsCanBeMerged->findConflictsWithinSelectionSet()
#22 /var/www/html/vendor/webonyx/graphql-php/src/Language/Visitor.php(414): GraphQL\\Validator\\Rules\\OverlappingFieldsCanBeMerged->GraphQL\\Validator\\Rules\\{closure}()
#23 /var/www/html/vendor/webonyx/graphql-php/src/Language/Visitor.php(470): GraphQL\\Language\\Visitor::GraphQL\\Language\\{closure}()
#24 /var/www/html/vendor/webonyx/graphql-php/src/Language/Visitor.php(277): GraphQL\\Language\\Visitor::GraphQL\\Language\\{closure}()
#25 /var/www/html/vendor/webonyx/graphql-php/src/Validator/DocumentValidator.php(224): GraphQL\\Language\\Visitor::visit()
#26 /var/www/html/vendor/webonyx/graphql-php/src/Validator/DocumentValidator.php(116): GraphQL\\Validator\\DocumentValidator::visitUsingRules()
#27 /var/www/html/vendor/webonyx/graphql-php/src/GraphQL.php(153): GraphQL\\Validator\\DocumentValidator::validate()
#28 /var/www/html/vendor/webonyx/graphql-php/src/GraphQL.php(94): GraphQL\\GraphQL::promiseToExecute()
#29 /var/www/html/vendor/rebing/graphql-laravel/src/Support/ExecutionMiddleware/GraphqlExecutionMiddleware.php(32): GraphQL\\GraphQL::executeQuery()
#30 /var/www/html/vendor/rebing/graphql-laravel/src/Support/ExecutionMiddleware/AbstractExecutionMiddleware.php(34): Rebing\\GraphQL\\Support\\ExecutionMiddleware\\GraphqlExecutionMiddleware->handle()
#31 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Rebing\\GraphQL\\Support\\ExecutionMiddleware\\AbstractExecutionMiddleware->resolve()
#32 /var/www/html/vendor/rebing/graphql-laravel/src/Support/ExecutionMiddleware/AbstractExecutionMiddleware.php(33): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#33 /var/www/html/vendor/rebing/graphql-laravel/src/Support/ExecutionMiddleware/AddAuthUserContextValueMiddleware.php(28): Rebing\\GraphQL\\Support\\ExecutionMiddleware\\AbstractExecutionMiddleware->Rebing\\GraphQL\\Support\\ExecutionMiddleware\\{closure}()
#34 /var/www/html/vendor/rebing/graphql-laravel/src/Support/ExecutionMiddleware/AbstractExecutionMiddleware.php(34): Rebing\\GraphQL\\Support\\ExecutionMiddleware\\AddAuthUserContextValueMiddleware->handle()
#35 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Rebing\\GraphQL\\Support\\ExecutionMiddleware\\AbstractExecutionMiddleware->resolve()
#36 /var/www/html/vendor/rebing/graphql-laravel/src/Support/ExecutionMiddleware/AbstractExecutionMiddleware.php(33): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#37 /var/www/html/vendor/rebing/graphql-laravel/src/Support/ExecutionMiddleware/AutomaticPersistedQueriesMiddleware.php(42): Rebing\\GraphQL\\Support\\ExecutionMiddleware\\AbstractExecutionMiddleware->Rebing\\GraphQL\\Support\\ExecutionMiddleware\\{closure}()
#38 /var/www/html/vendor/rebing/graphql-laravel/src/Support/ExecutionMiddleware/AbstractExecutionMiddleware.php(34): Rebing\\GraphQL\\Support\\ExecutionMiddleware\\AutomaticPersistedQueriesMiddleware->handle()
#39 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Rebing\\GraphQL\\Support\\ExecutionMiddleware\\AbstractExecutionMiddleware->resolve()
#40 /var/www/html/vendor/rebing/graphql-laravel/src/Support/ExecutionMiddleware/AbstractExecutionMiddleware.php(33): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#41 /var/www/html/vendor/rebing/graphql-laravel/src/Support/ExecutionMiddleware/ValidateOperationParamsMiddleware.php(39): Rebing\\GraphQL\\Support\\ExecutionMiddleware\\AbstractExecutionMiddleware->Rebing\\GraphQL\\Support\\ExecutionMiddleware\\{closure}()
#42 /var/www/html/vendor/rebing/graphql-laravel/src/Support/ExecutionMiddleware/AbstractExecutionMiddleware.php(34): Rebing\\GraphQL\\Support\\ExecutionMiddleware\\ValidateOperationParamsMiddleware->handle()
#43 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Rebing\\GraphQL\\Support\\ExecutionMiddleware\\AbstractExecutionMiddleware->resolve()
#44 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#45 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Pipeline\\Pipeline->then()
#46 /var/www/html/vendor/rebing/graphql-laravel/src/GraphQL.php(157): Illuminate\\Pipeline\\Pipeline->thenReturn()
#47 /var/www/html/vendor/rebing/graphql-laravel/src/GraphQL.php(140): Rebing\\GraphQL\\GraphQL->executeViaMiddleware()
#48 /var/www/html/vendor/rebing/graphql-laravel/src/GraphQL.php(126): Rebing\\GraphQL\\GraphQL->executeAndReturnResult()
#49 /var/www/html/vendor/rebing/graphql-laravel/src/GraphQLController.php(43): Rebing\\GraphQL\\GraphQL->execute()
#50 /var/www/html/vendor/rebing/graphql-laravel/src/Helpers.php(24): Rebing\\GraphQL\\GraphQLController->Rebing\\GraphQL\\{closure}()
#51 /var/www/html/vendor/rebing/graphql-laravel/src/GraphQLController.php(40): Rebing\\GraphQL\\Helpers::applyEach()
#52 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Rebing\\GraphQL\\GraphQLController->query()
#53 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction()
#54 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(261): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#55 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(204): Illuminate\\Routing\\Route->runController()
#56 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(725): Illuminate\\Routing\\Route->run()
#57 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#58 /var/www/html/vendor/statamic/cms/src/Http/Middleware/HandleToken.php(13): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#59 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Statamic\\Http\\Middleware\\HandleToken->handle()
#60 /var/www/html/vendor/statamic/cms/src/Http/Middleware/RequireStatamicPro.php(17): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#61 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Statamic\\Http\\Middleware\\RequireStatamicPro->handle()
#62 /var/www/html/vendor/statamic/cms/src/Http/Middleware/SwapExceptionHandler.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#63 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Statamic\\Http\\Middleware\\SwapExceptionHandler->handle()
#64 /var/www/html/vendor/statamic/cms/src/GraphQL/Middleware/CacheResponse.php(22): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#65 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Statamic\\GraphQL\\Middleware\\CacheResponse->handle()
#66 /var/www/html/vendor/teamnovu/statamic-redirect-entry-uri/src/Http/Middleware/RedirectEntryUri.php(35): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#67 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Novu\\RedirectEntryUri\\Http\\Middleware\\RedirectEntryUri->handle()
#68 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#69 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()
#70 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#71 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle()
#72 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#73 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#74 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#75 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest()
#76 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Session\\Middleware\\StartSession->handle()
#77 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#78 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle()
#79 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#80 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle()
#81 /var/www/html/app/Http/Middleware/RedirectEntryUri.php(48): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#82 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\RedirectEntryUri->handle()
#83 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#84 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(726): Illuminate\\Pipeline\\Pipeline->then()
#85 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(703): Illuminate\\Routing\\Router->runRouteWithinStack()
#86 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(667): Illuminate\\Routing\\Router->runRoute()
#87 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(656): Illuminate\\Routing\\Router->dispatchToRoute()
#88 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\\Routing\\Router->dispatch()
#89 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#90 /var/www/html/vendor/teamnovu/laravel-novu-auth/src/Http/Middleware/InjectNovaAuthButton.php(25): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#91 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Novu\\Auth\\Http\\Middleware\\InjectNovaAuthButton->handle()
#92 /var/www/html/vendor/statamic/cms/src/Http/Middleware/DisableFloc.php(18): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#93 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Statamic\\Http\\Middleware\\DisableFloc->handle()
#94 /var/www/html/vendor/statamic/cms/src/Http/Middleware/CheckMultisite.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#95 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Statamic\\Http\\Middleware\\CheckMultisite->handle()
#96 /var/www/html/vendor/statamic/cms/src/Http/Middleware/CheckComposerJsonScripts.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#97 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Statamic\\Http\\Middleware\\CheckComposerJsonScripts->handle()
#98 /var/www/html/vendor/statamic/cms/src/Http/Middleware/PoweredByHeader.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#99 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Statamic\\Http\\Middleware\\PoweredByHeader->handle()
#100 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#101 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#102 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#103 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#104 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#105 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#106 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#107 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#108 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#109 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#110 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(62): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#111 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Http\\Middleware\\HandleCors->handle()
#112 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#113 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Http\\Middleware\\TrustProxies->handle()
#114 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#115 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\\Pipeline\\Pipeline->then()
#116 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#117 /var/www/html/public/index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle()
#118 /var/www/html/server.php(21): require_once('...')
#119 {main}
"}

### Environment

```yaml
Environment
Application Name: Die Petarde
Laravel Version: 9.26.1
PHP Version: 8.1.4
Composer Version: 2.3.4
Environment: local
Debug Mode: ENABLED
URL: petarde-cms.novu.io
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: redis
Database: pgsql
Logs: single
Mail: smtp
Queue: sync
Session: redis

Statamic
Addons: 1
Antlers: regex
Version: 3.3.31 PRO

Statamic Addons
webographen/statamic-widget-continue-editing: 1.0.1

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

No response

Additional details

I hope you can reproduce this. If not, let me know and I'll dig deeper and add a reproduction repo.

tom-gurney commented 1 year ago

I've just started seeing this issue with a Replicator field on the Users blueprint, I'm not querying users via GraphQL but it's breaking the /graphql endpoint for me. The Replicator field isn't a recent addition either, it's happily been on the blueprint for around 4 months.

Running Statamic 3.3.60 here, previously running 3.3.42 (updated when the issue appeared).

I've not had a chance to have a good poke around yet, but I'm going to try register the type myself (like you suggested) and see if that helps in the short term.

EDIT: So I registered the type manually, which threw a load of different errors - I since discovered that there was a bit of malformed GraphQL in the actual query which was completely unrelated to Users. @Buffalom - obviously there is still something fishy going on with User blueprints and additional fields, but could be worth checking your GraphQL query to see if there are any malformed queries in there, that may be tripping up this error.

duncanmcclean commented 8 months ago

Hey 👋

I'm unable to reproduce this issue on the latest version of Statamic. I can query fields in a Grid fieldtype as expected:

CleanShot 2024-01-08 at 17 04 24

I believe this was fixed by #8335.

I'm going to close this issue now. If you're still experiencing this issue, please leave a comment and we can re-open the issue. Thanks!