When opening the default GraphQL schema in the control panel, a php notice is raised: compact(): Undefined variable: accessToken in line 218 of GraphqlController
The variable $accessToken is only defined in the else part in the condition above this line, so whenever the condition matches, $accessToken is not defined.
admin/graphql/schemas after upgrading Craft 3.2 to 3.3Interesting, I wasn鈥檛 seeing this on PHP 7.2 but 7.3 may be more strict. Will get it fixed.
Was just too excited to try out the recently announcement of GraphQL api and the headlessMode and also got this this error.
My current settings are:
PHP version | 7.3.6
Database driver & version | MySQL 5.5.5
Craft edition & version | Craft Pro 3.3.0
Just fixed this for the next release.
To get the fix early, change your craftcms/cms requirement in composer.json to:
"require": {
"craftcms/cms": "dev-develop#33a625fcc102775fce7e6e6121cee2c04ee1c125 as 3.3.0",
"...": "..."
}
Then run composer update.
That last commit introduced another bug. If you experienced the original issue and/or updated to 33a625fcc102775fce7e6e6121cee2c04ee1c125, please update to Craft 3.3.0.1.
Most helpful comment
Just fixed this for the next release.
To get the fix early, change your
craftcms/cmsrequirement in composer.json to:Then run
composer update.