-
Notifications
You must be signed in to change notification settings - Fork 21
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
Unable to configure apollo extension #187
Comments
Hi Maciej, it would be great if you could share the name & contents of your configuration file (of course without sensitive details), an idea of your folder layout (where is the config file, which folder do you have open), and the exact error message. |
I am also having similar experience. I haven't try earlier version cause i have some files to exclude(which seems not working option on version 1.x). I am trying to link with local schema without using Apollo schema registry. I have logs which seems not that helpful
my apollo/server version is: "@apollo/server": 4.9.5, Can i get any help? |
@bhpark1013 also, could I please get the full unshortened error with the full stack trace? That might actually tell me something :) |
Assuming that this error comes somewhere out of the corner of code you are pointing to, it would come from |
For the configuration we have:
Configuration is located in root folder of nx workspace. VS Code output logs |
@mklemarczyk Just to be sure: your server is running, and you also see an introspection query come in there? PS: shouldn't make a difference, but for a http connection, you won't need |
As for now, I suspect that your problems might come somewhere from these changes, but I can't put my finger on it :/ |
Are you actually using
Seems I might need to swap in a |
If this is your problem, could you maybe check out if #190 fixes the problem for you? I have to go OOO right now, but I'll spend more time on this on monday. |
Hello @phryneas our server is local HTTP server, without any security. That option you mentioned I think was a workaroud from long time ago, it works in old version (1.20.0) without it as well. Yes there is IntrospectionQuery logged in server for both extension 1.20.0 and 2.2.0. For any hover in graphql there is no result.
|
Could you try to execute the that would look something like
and tell us if your schema could be loaded and how many types were recognized. |
@mklemarczyk Just to validate, you are getting that while you have an editor open with a file that was previously recognized? This could be something with the |
Yes, I confirm, for the same exact configuration file, no configuration done in VS Code what so ever (default extension settings). |
@mklemarczyk Didn't you have My assumption is that because we updated one of the dependencies (e.g. we jumped multiple major versions of |
@mklemarczyk I've created this custom build that logs a bit more and should hopefully shed some light here. vscode-apollo-0.0.0-build.1725552078.pr.195.commit.e20f10b.zip. To install the extension, download the file, unzip it and install it in VS Code by selecting "Install from VSIX..." in the Extensions view. Alternatively, run code --install-extension vscode-apollo-0.0.0-build.1725552078.pr.195.commit.e20f10b.vsix --force from the command line. Could you please try that out? No need to enable trace logging, this should show up in the Output panel even without that. It should show us your |
I'm also having this problem. Here is the output for me when running the special extension:
I redacted our graph id and parts of the paths, but those shouldn't be relevant. |
@Zache thank you for the report! |
Unsure where my cursor was, but I have a GraphQL file (listed by the
extension in a redacted part) open. In case you meant the caret I also
don’t know where it was either. I’ll report back when I’m at my computer
again
…On Thu, 12 Sep 2024 at 10:55, Lenz Weber-Tronic ***@***.***> wrote:
@Zache <https://github.com/Zache> thank you for the report!
Just to be clear, you are executing the Apollo: Show Status command while
your cursor is in an editor of one of the .graphql files that are listed
under [INFO] found files: ?
—
Reply to this email directly, view it on GitHub
<#187 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA3AXQHI3KYUVSM2373DMQ3ZWFJHRAVCNFSM6AAAAABNJ3YUZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGY3TENZSGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Zache Yeah, that's quite important - the extension is only active inside of files in your |
@phryneas I tried it again, this time making sure that my cursor and caret was in an included .graphql file. But I still get the same error. Maybe it could be of interest that if I click the 🚀Apollo button down in the status bar it prints the extension name, but not the status error. I'm pretty certain that used to print the status also... |
@Zache That is really curious. If you have any more ideas what could make your environment unique, or could even come up with a minimal reproduction, I'd be very grateful. |
Hello @phryneas I was not able to download the file you mentioned. I get 404 error. In some free time I will record you a video with the issue later today. |
@mklemarczyk yeah that build only stays around for two weeks - here is a new one :) You can download the latest build of the extension for this PR here: To install the extension, download the file, unzip it and install it in VS Code by selecting "Install from VSIX..." in the Extensions view. Alternatively, run code --install-extension vscode-apollo-0.0.0-build-1726659863.pr-195.commit-a14272e.vsix --force from the command line. |
@mklemarczyk I believe you just found a bug that I shipped yesterday 😅 I just opened a PR to fix this bug over in #211 and will have a new build to try in a moment :) |
Okay, new build coming up - thank you for your patience! You can download the latest build of the extension for this PR here: To install the extension, download the file, unzip it and install it in VS Code by selecting "Install from VSIX..." in the Extensions view. Alternatively, run code --install-extension vscode-apollo-0.0.0-build-1726752845.pr-195.commit-2c7e56c.vsix --force from the command line. |
Now I'm getting errors One thing I don't think I have mentioned is that I do get a little blue "play" button to open in Apollo Studio and that works without any problem. But I still don't get Intellisense |
@Zache those errors should have been solved with friday's release. Could you please verify that you are on If you are still encountering, could you share some of the things in your config file that might help me reproduce the problem? |
I'm still getting this issue on Example code of
Whenever I start VSCode, I get the below error
I've explained a bit about our setup in #83 |
I was also having the After forcing It seems like some change between If anyone else is having this issue I'd suggest trying |
Hello @phryneas I tired the last release 2.3.3 of the extension. It says now that config file cant be found. I see the request in server for the GraphQL meta, but nothing moves in Visual Studio Code. I confirm that I do not have |
I really really want to help y'all, but I really don't get this reproduced on my end. 😞 I know that it is a big ask, but could one of you try to create some sort of reproduction for this? |
Try this test repo https://github.com/ankitprahladsoni/vscode-graphql-187 |
@ankitprahladsoni THANK YOU that helped a ton! I believe I could fix what you are encountering there - could you please give this build a try? :) I fear that @mklemarczyk might have a different problem though :/ |
Yes, that worked for me. Thanks for the super quick solution 🙇🏼 |
We're in a code freeze this week, so just a heads up so you're not confused - this will be released next week :) |
@ankitprahladsoni I just released that fix! |
Another configuration loading bug in older VSCode versions has been fixed in #226 and will be released in a bit. |
Hello dear
and this my config in
when downgrade to 1.20 everything worked |
@hmz22 could you try to recreate your exact folder layout with an otherwise empty project and upload that somewhere so I could take a look? |
I can't publish it in public because this is a private organization app and backend are microservices. |
@hmz22 I'm really talking about a minimal reporduction that shows the same behaviour - just a similar (mostly) empty folder structure, with the config file in the place where you have it and a I defintely don't want access to the full project or any sensitive data! :) |
Ok I create it and publish it. |
testing.zip List of all installed extensions
I am sorry, I do not have much time at work for that issue. We started to evaluate alternative extensions in place of apollo graphql. |
Hello, I was facing the exact same issue as you. You might want to check if you have queries or mutations with identical names. For example: // a.query.ts
const CREATE_SOMETHING = gql(`
mutation createSomething($a: String!) {
createSomething(a: $a)
}
`);
// b.query.ts
const CREATE_SOMETHING = gql(`
mutation createSomething($a: String!) {
// This is the issue
createSomething(a: $a)
}
`); Changing it to something like this solved the issue for me: // a.query.ts
const CREATE_SOMETHING = gql(`
mutation createSomething($a: String!) {
createSomething(a: $a)
}
`);
// b.query.ts
const CREATE_SOMETHING = gql(`
mutation createSomething_B($a: String!) {
// Mutation name changed
createSomething(a: $a)
}
`); I realized this after downgrading to version 2.0.0 and inspecting the error logs. After renaming the conflicting queries/mutations, everything worked correctly. I hope this helps you. |
@mklemarczyk in this case, I unfortunately don't have an api running on that port, and as a result the configuration fails to load 😞 As an alternative, could you try to set this setting and report back what you get in the logs? |
@HTMLhead so I understand you right that you did get that error in the old versions, but just nothing in the current versions? |
Hello @phryneas yes that's right. |
Hello @phryneas, I have the same issue where schema is loaded from my backend correctly and is valid but where the Obviously, I have limited knowledge to the code base, but where it seems to go wrong I tried playing around a bit by using normalizeURI() some more or URI.file(normalizeURI(..)) if needed, but cannot pinpoint the exact place where it goes wrong. |
Same issue. When I use 2.0.0, it works fine |
Hello, I got the last update 2.2.0 and it does not work anymore for my project.
I use the vs code workspace and my apollo config file is in the root folder. I use nx workspace folder structure fo angular project, that means the folder structure is quite deep.
I can provide more details later in the afternoon. Error is written to the console that it does not find the configuration file, even if you open the configuration file. I couldn’t find any helpful information in the verbose logs of the extension.
Last extension version that works for me is 1.20.0. I use apollo client npm in version 3.11.2 and apollo-angular in version 7.0.2.
Any version of extension 2.x has the same issue. I seen that your extension has very low reputation at VS Code Marketplace.
The text was updated successfully, but these errors were encountered: