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
Map a Sanity document to multiple Algolia records #14
Conversation
|
Oops, the |
|
@runeb @theianjones I've added the |
|
This last commit adds bit of a safety net to run the code shown here #12 (comment) without a hitch. |
|
Sorry about this @fabien – this slipped under my radar (granted, my GH notifications are flooded). Thanks for the PR! I'll bring this to the attention to the right people. |
|
Hello @fabien and thank you for your contributions! Apologies about not getting back to you sooner. The features you have added are good and I am positive about merging them. I just need some time to properly go through the PR as it is somewhat lengthy. I have a few reservations on the To unblock you I have cut a pre-release version of your PR at 1.1.0-alpha |
|
Hi @runeb, thanks for your kind reply and the alpha release! I agree, we should see if we can improve the naming of these options. I'm open to any suggestions. |
|
@fabien Any reason to use |
|
Ideally this should be split into multiple PRs. That would make it easier to review.
I've cherry picked and merged the async serialize commit into main, along with some other small commits from this PR |
I chose
Unless you explicitly include an Algolia InstantSearch widget to filter on |
Agreed, multiple PRs would have been ideal. However, except for the fixes and passing along Please let me know if you need further assistance. |
This PR covers the following:
SerializeFunctioncan now be asynchronous, which enables the serialize function to perform further async processing (api-calls, lookups, transforms etc.)serializefunction can return an array, which allows one input document to emit multiple output documents (for example, one for each item in an embedded array of objects within Sanity)can override default valuesdid not actually override a default, it should have usedobjectIDnotobjectIdPlease let me know if you are willing to merge this - otherwise I will be publishing my fork directly onto NPM soon. Thanks!