-
Notifications
You must be signed in to change notification settings - Fork 16
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
Return promise within markResolvers #47
Comments
Right now that's not possible i'm afraid, the API is designed to be synchronous. May i ask what your use case is? |
Our Storyblok setup is a bit exotic which means that without using resolve_links=story (which I don't want to use right now) I am not able to find a localized version of the internal link within a rich text component. I have written a separate util function which makes a async call to fetch all details necessary but I can't use it within a markResolver as you just mentioned. I saw someone asking something similar on the Contentful alternative: contentful/rich-text#83. I think I am going to use the same approach: process the document data before passing it to |
Yeah that'd be a solve. Otherwise, i guess i can make it work but that would require some significant changes and i'm not sure i'm prepared to do that, as i think most people are fine with it being sync |
Yea I can imagine, for now it's fine. I asked copilot to generate me a transform function and it worked first time :D Now I can just pass my transformed document to the library. |
Hey!
I wonder if there is a way to return a promise with a custom markResolvers? In my case I would need to make an async within my [MARK_LINK] resolver but it seems like it's not possible right now?
The text was updated successfully, but these errors were encountered: