graphql / graphql/graphiql

Exclude fields that are already selected from the code completion list

Open
#2,348 2 comments 3 reactions 0 assignees View on GitHub
graphql-language-service
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

## Actual behavior:
Currently, regardless of what fields already exist in the selection set, all fields are shown in the IntelliSense.
For example, if I have already selected the field `title`, when I go to the next line and enter `t`, `title` is still shown the list:

![image](https://user-images.githubusercontent.com/26527405/109537281-f4485000-7ad3-11eb-937a-2cfec21c92e6.png)

## Expected behavior:
I would propose excluding the fields that have already been selected from the code completion list; so that in the example above, `title` is not suggested again to the developer.
This would obviously be much better and it would give the developer more convenience because each time they only see the remaining fields, and they would not be suggested the fields that they have already selected.

In addition, it would also be nice the code editor gives you a warning whenever you select the same field more than once.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.