mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 20:00:29 +01:00
[PR #111] [MERGED] Preserve invalid GraphQL variables #48
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mountain-loop/yaak/pull/111
Author: @gschier
Created: 9/25/2024
Status: ✅ Merged
Merged: 9/25/2024
Merged by: @gschier
Base:
master← Head:preserve-invalid-graphql-variables📝 Commits (3)
cffb4a9Preserve invalid GraphQL variables (Fixes #103)81df6e5Migrate text to GraphQL7a24740Small tweak📊 Changes
3 files changed (+57 additions, -62 deletions)
View changed files
📝
src-tauri/src/http_request.rs(+17 -2)📝
src-web/components/GraphQLEditor.tsx(+38 -58)📝
src-web/components/RequestPane.tsx(+2 -2)📄 Description
This PR changes to GraphQL body type to use a custom format, instead of serializing to
text: ".."on every keystroke.This change is so we can preserve invalid JSON in the variables editor. Some people may want to make some changes, switch requests, then switch back and continue editing. The current requirement to parse variables as valid JSON prevents the editor from saving and throws away changes when navigating away. It's also very possible that someone might want to actually send invalid JSON to test a GraphQL endpoint. This PR makes that happen.
HttpRequest.bodyfrom{text: String}to{variables: Records<string, string>, query: string}<GraphQLEditor/>to use the new formattextproperty to new format within<GraphQLEditor/>Fixes #103
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.