Description
Describe the problem
I'm used to GraphQL Relay's concepts of data specification in a more declarative rather than imperative way. To achieve that, part of it is based on the principle of collocating data requirements next to where it is used. It makes an data intensive app more scalable as components become more modular, less coupled to pages, without over or underfetching.
Load
function is define what you need before you use. The methods I'm used to, you first use some data then it automatically request what you asked. I use gqless to achieve that. Rather than arguing which is better or has better performance, right now my workflow is not supported by svelte-kit.
Describe the proposed solution
It would be highly appretiated to be able to wait for something inside my svelte components before sending the results, or be able to extract the cache of it. Something in which I could extract information of what was compiled (without needing to right an preprocessor), pass cache back after await resolve(request)
at Handle
function in hooks.ts
.
Routify does have an utility called $ready()
which would be a good inspiration of api...
https://routify.dev/docs/helpers#ready
Alternatives considered
Leave as is and declare not scope of svelte-kit.
Refactor my app or be happy with some skeleton loading inside my app. But that would be a huge problem for SEO...
Importance
use SvelteKit without it becomes harder
Additional Information
Well, I could use Sveltekit without it, but I'd need to refactor all my app for it. And for my workflow it wouldn't be an improvement in terms of scalability.
about collocation:
https://www.graphql.com/articles/best-practices-for-graphql-clients