ChilliCream / ChilliCream/graphql-platform

Allow DEL character in request variables

Open
#7,759 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🌶️ hot chocolate Area: Scalars needs-repro
Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

Product

Hot Chocolate

Is your feature request related to a problem?

When a DEL character (0x7F) is included in a string passed in as a variable in a hot chocolate mutation call, HC throws an error parsing the request. The actual response returned to the client is something like this:

{
    "errors": [
        {
            "message": "Invalid character within String: 127.",
            "locations": [
                {
                    "line": 1,
                    "column": 3555533
                }
            ],
            "extensions": {
                "code": "HC0011"
            }
        }
    ]
}
The solution you'd like

It appears that characters like DEL are valid per the JSON spec (see discussion in https://github.com/salsify/jsonstreamingparser/issues/53). Could HC allow this character in input data?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Hot Chocolate's request-variable parsing path and compare its DEL-character handling with the JSON specification discussion linked in the issue. Done means a mutation variable containing character 0x7F is accepted without the HC0011 parsing error, with a regression test covering the request.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.