-
Notifications
You must be signed in to change notification settings - Fork 114
events created with newline in the description are lost #7
Comments
When I edit an event in DynamoDB console to have a newline in the description, it properly shows as \n in the console, but the app displays it as a space. |
A simple fix would be to escape() before creating and unescape() before displaying, but the job of satisfying DynamoDB's need for valid JSON seems to belong to the GraphQL layer or the Resolver. |
Ah, I see what you mean. This is a limitation of the request mapping template currently as the result of the evaluated template is expected to be a JSON object that will be used to configure the call to DynamoDB. You can currently pass mutli-line strings through to dynamodb by referencing an argument on the context. For example if you had this:
You can pass a description with newlines as you might expect. I'll take a note of this and look into the possibility of escaping the evaluated template. Thanks for the feedback! |
@mikeparisstuff this solution does not work for me. I'm using RDS and it only fails when the description has a new line |
So what fixed the issue in my case was to escape the value with:
eg:
|
The new event UI has a textarea for the description, which invites use of newlines. The Save button seems to work: the app goes from NewEvent back to Home and the new event appears briefly, but it then disappears.
I see a complaint in the console about an unescaped control character (decimal 10 is newline):
The text was updated successfully, but these errors were encountered: