graphql / graphql/graphiql

[graphiql-react] Incorrect editor suggestions

Open
#4,163 0 comments 0 reactions 0 assignees View on GitHub
bug graphiql
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Current Behavior

When you click on a suggestion (i.e. "after" in picture), it pops up a new menu that shows invalid suggestions. This could be fixed by adjusting the utility/create-editor file to add ` suggest: { showWords: false } ` to the options. Or an option to pass in editor overrides as that would also allow customizing other behaviors like scroll in issue #4142. I think an option to pass in editor overrides would be good regardless, as I have a weird behavior using the graphiql editor below something else in my app and the lint error message is going above and being cut off - and I setting hover: { above: false } seems to fix it so being able to customize would be nice.

Image

### Expected Behavior

_No response_

### Steps To Reproduce

Go to the https://swapi-graphql.netlify.app/ and type the `query { allFilms(after...` using the click on suggestions.

### Environment

* GraphiQL Version:
* OS:
* Browser:
* Bundler:
* `react` Version:
* `graphql` Version:

### Anything else?

_No response_

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.