使用 NGINX 时,我的 GraphQL API/架构没有任何问题。然而,当我切换到 Roadrunner 时,我突然间歇性地收到如下错误:
"message": "Lighthouse failed while trying to load a type: MyType\n\nMake sure the type is present in your schema definition.\n",
"exception": "Nuwave\\Lighthouse\\Exceptions\\DefinitionException",
"file": "/var/www/wright/ams/vendor/nuwave/lighthouse/src/Schema/TypeRegistry.php",
"line": 94
Run Code Online (Sandbox Code Playgroud)
有其他人经历过这个并找到解决方案吗?
我确实启用了 opcache,但即使禁用了它,我仍然遇到这个问题。
我运行了 php artisan lighthouse:validate-schema,它是有效的 我也运行了 php artisan lighthouse:clear-cache,但无济于事