Closed jBernavaPrah closed 2 years ago
Hi! Unfortunately, there are not enough details to debug this.
users
field is resolved to a schema properly, could you navigate to its definition from the test file?Also, could you please invoke Help > Collect logs and diagnostic data
in the IDE, upload the created archive to https://uploads.jetbrains.com/ and then attach the assigned ID to this ticket? So if the logs contain any sensitive data they will be available only for JB support. Or at least you could look in the log for ERROR and WARN messages. It's a good idea to edit a schema manually several times before collecting the logs to be sure that the schema building errors would be there.
Sorry for replaying so late!
This is not a bug. I played until I found a working solution correctly in that lighthouse project.
This is the current configuration inside the .graphqlconfig
file:
{
"projects": {
"BE": {
"excludes": [
"./storage/app/lighthouse-schema.json"
],
"includes": [
"graphql/**",
"schema-directives.graphql",
"programmatic-types.graphql"
]
},
"FE": {
"excludes": [
"graphql/**",
"schema-directives.graphql",
"programmatic-types.graphql"
],
"schemaPath": "./storage/app/lighthouse-schema.json"
}
}
}
Remember to run @php artisan lighthouse:print-schema --write --json
.
ps. Often the changes made to the file .graphqlconfig
or the file ./storage/app/lighthouse-schema.json
are not loaded immediately on the plugin. So wait or reopen the phpstorm.
Describe the bug
I'm using Laravel/Lumen with the lighthouse package. The development of the schemas is working correctly without errors. However, when I'm defending the tests the IDE is marking me errors that shouldn't be there (as you can see in the image)
Do you know how to make the helpers work?
Expected behaviour The helper should identify the compiled schema during the testing.
Screenshots
Version and Environment Details Operation system: Mac IDE name and version: PHPStorm 21.1.4 Plugin version: 3.0.0