Add support for Ctrl+Shift+Enter autofill in query argument objects #2918
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR extends the "Fill all fields" feature (Ctrl+Shift+Enter) to work with GraphQL query arguments that accept input object types. Previously, this feature only worked for query fields with selection sets.
Problem
When users placed their cursor inside an argument object and pressed Ctrl+Shift+Enter, nothing would happen:
{ withGOTCharacter(character: { }) # ^ Ctrl+Shift+Enter did nothing here }This was mentioned in the issue comments: "Oh it does not work for arguments. Only query fields"
Solution
The implementation adds a separate code path for handling argument objects while preserving the existing field selection behavior:
Before:
{ withGOTCharacter(character: { }) }After pressing Ctrl+Shift+Enter inside the braces:
{ withGOTCharacter(character: { id: book: { id: url: name: authors: characters: released: } spouse: allegiances: }) }Implementation Details
Core Changes
buildInputObjectFields()function that:addQueryDepthLimitsettingEnhanced User Experience
Files Changed
Testing
Benefits
Closes #[issue-number]
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
downloads.sentry-cdn.comIf you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Fixes #1751
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.