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

Support formatting/prettifying GraphQL request variables #2265

Closed
1 task done
Eynorey opened this issue May 8, 2024 · 1 comment
Closed
1 task done

Support formatting/prettifying GraphQL request variables #2265

Eynorey opened this issue May 8, 2024 · 1 comment
Labels
enhancement New feature or request module-graphql

Comments

@Eynorey
Copy link
Contributor

Eynorey commented May 8, 2024

I have checked the following:

  • I've searched existing issues and found nothing related to my issue.

Describe the feature you want to add

There's already a "Prettify" button for GraphQL queries/mutations, but not for the JSON variables editor.

Would like to propose to add such a button to the CodeEditor component (should be opt-in for consumers of that component) so that it can be made available to the GraphQL variables editor and potentially other places (such as QueryResultPreview to allow for formatting response bodies).

As is already the case with the GraphQL query editor, prettier should be able to do the job just fine here.

Mockups or Images of the feature

image

@Eynorey Eynorey added the enhancement New feature or request label May 8, 2024
helloanoop pushed a commit that referenced this issue Sep 4, 2024
* feat: support GraphQL variables formatting

* Update index.js

* revert codeeditor component changes

* revert codeeditor component

---------

Co-authored-by: lohit <[email protected]>
@RyPeck
Copy link

RyPeck commented Nov 25, 2024

This looks done! Thank you!

@Eynorey Eynorey closed this as completed Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module-graphql
Projects
None yet
Development

No branches or pull requests

3 participants