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

feat: use internal suggestions #132

Merged
merged 2 commits into from
Dec 10, 2023
Merged

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Dec 9, 2023

Resolves #111
fixes #127
fixes #130

This introduces two changes, first we use our internal suggestions algorithm which filters out fragments and fields that are already used (unless using an alias). Secondly it decrements the starting token for the col to improve suggestions for narrow spacing i.e. queryField() and fragment x on Y {}

A fragment being typed with only closed curlies but it still shows the correct field-suggestions which was bugged before as it thought we were after the closing curly and would suggest root-fields A query named `todos` where we have an opening and closing brace, our cursor is in-between it and it correctly suggests to either use limit or skip

@JoviDeCroock JoviDeCroock requested a review from kitten December 9, 2023 07:27
Copy link

changeset-bot bot commented Dec 9, 2023

🦋 Changeset detected

Latest commit: 2933a9f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@0no-co/graphqlsp Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@JoviDeCroock JoviDeCroock force-pushed the use-internal-suggestions-algo branch from 0dd250d to 7af0d0a Compare December 9, 2023 07:27
@JoviDeCroock JoviDeCroock merged commit 8614a80 into main Dec 10, 2023
1 check passed
@JoviDeCroock JoviDeCroock deleted the use-internal-suggestions-algo branch December 10, 2023 10:54
@github-actions github-actions bot mentioned this pull request Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant