Closed SeverinNauer closed 1 day ago
Hi @SeverinNauer Thank you for using kiota and for reaching out.
This is a more advanced scenario we didn't necessarily designed for.
This is where the reset is happening
My suggestion is to create your "own backing store serialization writer factory" for the first step that would effectively not have this second callback (so it doesn't mutate the backing store).
Using that factory you'll be able to get a serialization writer, and write the object for logging purposes.
Then using the "regular pipeline" you'll be able to send the payload to the service.
Let us know if you have any additional comments or questions.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Currently the tracked properties in the
InMemoryBackingStore
get reset when serializing an object. For my purposes I want to create a report of the objects that are going to be sent to the graph api before actually sending them. At the moment this is not easily possible, because I can only serialize them once.This is a short example of the problem I want to avoid
Is there a way to avoid this behaviour? The only workaround I know is to disable (which is not an option for me) or replace the
BackingStore
implementation. I'm okay with writing an own implementation of theBackingStore
but it feels kind of dirty since I basically need to copy past theInMemoryBackingStore
. I'm also not sure if I'm going to run into other troubles down the line if I do this.