-
Notifications
You must be signed in to change notification settings - Fork 271
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
fix for \n in json selection arguments #6322
base: next
Are you sure you want to change the base?
Conversation
✅ Docs Preview ReadyNo new or changed pages found. |
CI performance tests
|
i dunno if this is the right fix
4fc09af
to
44dd425
Compare
# but because we remove the escape for the newline, it's 20:26..20:27 | ||
@connect( | ||
http: { GET: "http://127.0.0.1/something" } | ||
selection: "foo\nbar." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to support literal \n
sequences? Maybe inside string literals inside JSONSelection LitExpr
syntax, but elsewhere they're just another kind of whitespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string values can contain escapes: https://spec.graphql.org/draft/#sec-String-Value — i think these are intended to be equivalent:
"foo\nbar"
"""foo
bar"""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSONSelection on its own handles them just fine. the problem is that they get double-escaped when we read the string from the original source code in an attempt to preserve the original line/column for diagnostics
i dunno if this is the right fix
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩