Skip to content
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

Add schema and resolvers finder #152

Open
wants to merge 1 commit into
base: feat/v3
Choose a base branch
from

Conversation

darkbasic
Copy link

  • Adds resolvers section to .gqlconfig:
    0
  • Implements Resolvers Finder as Go To Definition and CodeLens:
    0
  • Implements Schema Finder as Go To Definition and CodeLens:
    0
  • Allows Go To Definition to resolve the base schema from an extended schema:
    0

I didn't find any way to initiate a showTextDocument from the server, so for the moment I just show a message to the client with the resolver location: microsoft/language-server-protocol#612
If we decide that we like the CodeLens approach I could give it a shot and submit a PR to implement it.

@darkbasic
Copy link
Author

See also:
Mayank1791989/gql-language-server#3
kumarharsh/graphql-for-vscode#131

@kumarharsh
Copy link
Contributor

@darkbasic that is some fantastic work! 👏🏻

@darkbasic
Copy link
Author

Forgot to mention the PR on vscode-languageserver-node to enhance the protocol to implement ShowTextDocumentRequest, necessary for Code Lens: microsoft/vscode-languageserver-node#490

@RyanzpLee
Copy link

Hey @darkbasic I just wanted to ask if this feature was ever implemented into any other extensions. Seems like a useful feature but looks like it was never released for this extension at least?

@darkbasic
Copy link
Author

Hi, unfortunately this is still unreleased work.

@RyanzpLee
Copy link

Would it be okay if I try to get this working locally on a extension?

@darkbasic
Copy link
Author

Sure, I would love to!

@RyanzpLee
Copy link

Sure, I would love to!

Thank you! I have absolutely no experience with any of this but this type of feature would be extremely useful for me in a very large graphql codebase. Hopefully I can manage 😄

@darkbasic
Copy link
Author

If you want want an head start back then I made a Youtube video showcasing my work. It probably won't add anything which isn't already covered in this PR, but I'm linking it nevertheless.

@RyanzpLee
Copy link

If you want want an head start back then I made a Youtube video showcasing my work. It probably won't add anything which isn't already covered in this PR, but I'm linking it nevertheless.

Thank you for the video! As I understand, this extension was parsing the graphqlrc config and you added a new field called resolvers.

Do you think this feature could also be implemented in the Vscode-graphql as that is a maintained extension? I've had an explanatory investigation to see if it would be possible but I'm not sure how big the scope of work would be to do so.

Do you have any advice on this please?

@darkbasic
Copy link
Author

Do you think this feature could also be implemented in the Vscode-graphql as that is a maintained extension

I think so but I cannot be sure until I dig deep into the extension internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants