Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: Can't remove all permissions from public GraphQL scheme #11240

Closed
olsp opened this issue May 16, 2022 · 2 comments
Closed

[4.x]: Can't remove all permissions from public GraphQL scheme #11240

olsp opened this issue May 16, 2022 · 2 comments

Comments

@olsp
Copy link

olsp commented May 16, 2022

What happened?

Description

I added several permissions to the public scheme for testing and wanted to remove them all again. When I uncheck all permissions and save, an error occurs:

TypeError: Cannot assign null to property craft\models\GqlSchema::$scope of type array in /www/htdocs/xxx/vendor/craftcms/cms/src/controllers/GraphqlController.php:586
Stack trace:
#0 [internal function]: craft\controllers\GraphqlController->actionSavePublicSchema()
#1 /www/htdocs/xxx/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#2 /www/htdocs/xxx/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#3 /www/htdocs/xxx/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('save-public-sch...', Array)
#4 /www/htdocs/xxx/vendor/craftcms/cms/src/web/Application.php(301): yii\base\Module->runAction('graphql/save-pu...', Array)
#5 /www/htdocs/xxx/vendor/craftcms/cms/src/web/Application.php(625): craft\web\Application->runAction('graphql/save-pu...', Array)
#6 /www/htdocs/xxx/vendor/craftcms/cms/src/web/Application.php(280): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#7 /www/htdocs/xxx/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#8 /www/htdocs/xxx/web/index.php(26): yii\base\Application->run()
#9 {main}

Craft CMS version

4.0.2

@brandonkelly
Copy link
Member

Fixed for the next release! Thanks for reporting.

@brandonkelly
Copy link
Member

Craft 4.0.3 is out now with that fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants