hasura / hasura/graphql-engine
Escaping double-quotes in Request Transform produces an error in Hasura v2.2.0
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version:
CLI Version (for CLI related issue): v2.2.0
### Environment
K8S
### What is the expected behaviour?
Previously in Hasura v2.1.1, I had created an Hasura Action with a "Request Transform". I am now unable to upgrade to Hasura v2.2.0 because this Hasura Action is now erroring with the following message (simplified example to show the error in v2.2.0):

I'm basically escaping the double-quotes (`\"test\"`), which worked before in v2.1.1. Not using the escaped double-quotes work, however this is not valid JSON for the targeted action.
Am I missing something? Is there another way to escape double-quotes?
### Keywords
Action, Request Transform, Request Body, LexError
### What is the current behaviour?
The Request Transform containing escaped double-quotes gives out a LexError
### How to reproduce the issue?
See above
Contributor guide
Research direction
Start by reproducing the Request Transform failure in Hasura v2.2.0 using escaped double-quotes in an Action request body, and compare it with v2.1.1. Trace the LexError reported for this transform and verify that valid JSON escaping works without errors while unescaped invalid JSON remains rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100