You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to use an async function when modifying the document before or after the graphql replication happens. RXDB already provides a modifier function as part of the push and pull config, but I am not able to perform asynchronous code within it.
In my app I have two related models, a Submission and Submission Globals, these are both reflected as collections in RxDB. I want the push replication I have set up for Submissions to also create it's related Submission globals at the same time. I want my modifier function to look something like this:
I do not see any reason why this is a bad idea. The http-request in the end is async anyway so having an async modifier should work too.
Yes please make a PR.
Case
REQUEST FOR A NEW FEATURE
Issue
I would like to be able to use an async function when modifying the document before or after the graphql replication happens. RXDB already provides a modifier function as part of the push and pull config, but I am not able to perform asynchronous code within it.
In my app I have two related models, a Submission and Submission Globals, these are both reflected as collections in RxDB. I want the push replication I have set up for Submissions to also create it's related Submission globals at the same time. I want my modifier function to look something like this:
I have created the modifications required but thought its best to discuss here first before making a PR. https://github.com/zefman/rxdb/tree/feat/graphql-replication-async-modifier
Is there any reason this is a bad idea? If you think this is a suitable request I will open a PR. Thanks
Info
The text was updated successfully, but these errors were encountered: