Replies: 1 comment 2 replies
-
Have you tried achieving a similar result with a normal query, but nested? const { data } = await useKql({
query: 'site',
select: {
site: siteQuery,
articles: articlesQuery,
navigation: navigationQuery
}
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would it be possible to create a composable that sends all the queries as a single post request?
So we can limit the amount of requests to the server. Ideally the page and queries are cached, but sometimes when a page is updated it needs toi bypass the cache and do new requests. I'm asking this since the webhosting I'm using for a Kirby instance has some sort of rate-limit for requests… And it already happend that a page got an
error-403
from the server. This to me indicates it has a rate-limit for requests (at least coming from cf).In such case it would already help when the queries can be combined in one batch/request. Not sure if that makes any sense?
I was roughly thinking about something like this:
Which then can be used in our templates like this:
Or is something like this this already possible without me noticing it?
Also worth noting that the graphql-plugin for nuxt has this feature:
https://github.com/gomah/nuxt-graphql-request?tab=readme-ov-file#batch-queries
Hope it's worth asking it anyway :)
Beta Was this translation helpful? Give feedback.
All reactions