Closed sc0ttdav3y closed 1 year ago
Hi! The query file also should be included in the globs specified in the config (or you can remove "includes" completely if you don't need it):
{
"name": "Test",
// "includes": ["*.graphql"],
// "includes": ["./schema/**", "queries.graphql"],
"extensions": {
"endpoints": {
"blue": {
"url": "https://XXXX.appsync-api.ap-southeast-2.amazonaws.com/graphql",
"headers": {
"Authorization": "XXX"
},
"introspect": false
}
}
}
}
Hi @vepanimas, thanks for responding.
I had hoped it was a config issue at my end, and it sounds like it might be. However I'm still not able to get it all working with your response.
There are two features I'm trying to get going: first, it's the endpoint in the selector with the ability to run the query; and second, syntax highlighting with the ability to autocomplete, click through to schema, etc.
I've taken your two ideas and run a few combinations:
"includes": ["./schema/*.graphql"],
does not show the endpoint, but the syntax highlighting stops working"includes": ["./schema/*.graphql", "*.graphql"],
does show the endpoint, but syntax highlighting stops working"includes": ["**.graphql"],
does show the endpoint, but syntax highlighting stops workingincludes
entirely does show the endpoint but syntax highlighting stops workingI figure I must be doing something wrong but I can't see it. Any ideas?
@sc0ttdav3y looks like something goes wrong, unfortunately. Could you please invoke Help > Collect logs and diagnostic data
in IDEA and upload the created archive here? Or you could upload it to https://uploads.jetbrains.com/ and attach the assigned ID to this ticket, so if the logs contain any sensitive data they will be available only for JB support.
@sc0ttdav3y hi! Any updates on that? I'm really interested to catch all the schema building issues and fix them 🙏.
Close as not reproduced 😢
Hi,
Thanks for the plugin. I've used this in the past and it's really useful.
I've read through the guides and examples and it may be related to https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/issues/143 or https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/issues/487 but it feels different so I've opened a new report.
If it's a documentation or a user problem, then help and guidance would be appreciated.
Describe the bug
In short, I can't run any GraphQL queries from regular
.graphql
files (but I can run them from scratch files).I've got a
.graphqlconfig
file as follows, which specifies a valid endpoint.I have a valid
queries.graphql
file with a simple graphql query, sitting in the same directory as the.graphqlconfig
file:The syntax highlighting is working and I can hover over the variables to show the plugin knows the types.
But the endpoint selector is empty, and I've also got a message about "The .graphqlconfig associated with this file does not include it" (side note: I don't understand what that means).
However, in the GraphQL tool window I can see the endpoint, and double-clicking it gives me the option to create a new scratch file, which does execute, but which doesn't have full syntax highlighted.
To Reproduce
I've created a basic repo with a working example of the problem: https://github.com/sc0ttdav3y/js-graphql-intellij-plugin-example
Steps:
queries.graphql
fileExpected behavior:
I expect to see the endpoint listed in the select box at the top of the window.
Actual behaviour:
The select box is empty.
Version and Environment Details
Operation system: MacOS 11.5.2 IDE name and version: PhpStorm 2021.2.1 (latest) Plugin version: 3.0.0 (latest)
Additional Context
May be related to https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/issues/143 or https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/issues/487
I've had this same configuration working in 2020 when I was last in GraphQL land, but I've had an IDE upgrade and a plugin upgrade since then, which is why I suspect it's a bug and not a user/docs problem. But if I'm doing something wrong then advice is appreciated.
Thanks!