-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Move JSON.stringify from PubSub to DynamoDBEventStore and make it optional #77
Comments
@ebarault sorry for the late response. That's actually a good question. I'm not quite sure at the moment why I used Does it cause problems for you? |
@michalkvasnicak Well actually in particular in the contexte of DyanamoDB i don't see the reason why to force the payload to be a string, as DynamoDB would accept any arbitrary form of JSON object. We have a situation where the writer of the events in the DynamoDB event table is totally out of scope of this library, as it cannot use a graphql mutation to write the events. So we have to fallback to the writing the raw data in DynamoDB, and it clutters a bit the code to have to JSON.stringify the payload. Also it make the payload unreadable in the DyanamoDB explorer, which is bad and when debugging. It would be great if you could relax this constrain. |
@ebarault yes I you're right. The problem is backward compatibility. Maybe we could remove |
@michalkvasnicak yes, that sounds like a reasonable way forward to offer more flexibility while keeping backward compatibility |
Ok so I found a little time to do something about this. It seems it doesn't matter if there is |
Hi @michalkvasnicak,
This is more a question at this stage, but after digging more into your implementation, I wonder what is the rationale for stringifying the message payload in the PubSub publish method ?
On the contrary, the SubscriptionEvent type does not expect the String type:
Is this in an effort to ease EventStore backend implementations ?
Thank you
cc: @SuperHamouch11
The text was updated successfully, but these errors were encountered: