This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Description
I'm looking into your library today, and I'm noticing that you are abstracting a lot how the kit performs queries. It's fine by itself, but it suppresses a key upside of the official kit: the ability to chain calls to specify your query. For instance:
api.forms('products').query('[[:d = at(document.tag, "featured")]]').orderings('[product.price]').pageSize(10).page(2).ref(ref).submit()
I wonder how best to expose this with the current approach. Maybe simply with a Prismic.api so that we can do stuff such as Prismic.api.forms('products').query('[[:d = at(document.tag, "featured")]]').orderings('[product.price]').pageSize(10).page(2).submit(). This might require to extend the original SearchForm object so that submit() returns a promise, but that could work!
Notice that I haven't used ref. I like the way you've abstracted the call to ref in a clean way, still making it possible to pass another ref in the page's URL.
I can totally make that happen, I just thought I'd reach out first to talk about how to do this best.