graphiql icon indicating copy to clipboard operation
graphiql copied to clipboard

Disable`fillLeafsOnComplete` by default

Open acao opened this issue 2 years ago • 5 comments

Users found this generally annoying by default, especially when there are required arguments

Without automatically prompting autocompletion of required arguments as well as lead expansion, it makes the extension harder to use

You can now supply this in your graphql config:

config.extensions.languageService.fillLeafsOnComplete

Setting it to to true will enable this feature. Will soon add the ability to manually enable this in monaco-graphql as well.

For both, this kind of behavior would be better as a keyboard command, context menu item &/or codelens prompt. We could even re-create the graphiql behavior for this, where after choosing an autocomplete item, CMD + return will automatically fill leaf fields

acao avatar Jun 08 '22 10:06 acao

🦋 Changeset detected

Latest commit: e385cc0612fdae5d3e0db426e9f2cdf84049b86b

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

This PR includes changesets to release 4 packages
Name Type
graphql-language-service-server Patch
monaco-graphql Patch
vscode-graphql Patch
graphql-language-service-cli Patch

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

changeset-bot[bot] avatar Jun 08 '22 10:06 changeset-bot[bot]

The latest changes of this PR are available as canary in npm (based on the declared changesets):

[email protected]
[email protected]
[email protected]

github-actions[bot] avatar Jun 08 '22 10:06 github-actions[bot]

Bah, forgot I need to change a bunch of tests

acao avatar Jun 08 '22 10:06 acao

@stonexer what do you think - updating these tests with minor changes to the language service are cumbersome to the point that I wonder if snapshot tests would be more ideal sometimes?

the snapshot diffs would tell us everything we need to know about the changes. and then i could remove the boilerplate for asserting the expected output

acao avatar Jun 30 '22 17:06 acao

I also think the snapshot test might be more efficient on the language service. And we can be a little more detailed when we review the snapshot diff.

stonexer avatar Jul 01 '22 00:07 stonexer

@jonathanawesome you'll be pleased to see this bug fixed I'm sure, haha

Screenshot 2022-10-27 at 15 11 35

acao avatar Oct 27 '22 13:10 acao