useImperativeReference lets you imperatively load a new entrypoint (its naming sucks!)
We should be able to do that for a client field, e.g.
field Query.foo {
bar @loadedImperatively #or
bar | loadedImperatively
}
Not really sure yet about the syntax.
This should be read out as an object with type { kind: 'NotLoaded', load: () => void } | { kind: 'Loading' } | { kind: 'Loaded', data, dispose: () => void }
Or something. I'm not really sure.
Open questions
How does this relate to refetching with different variables? Those should probably have similar read out types
useImperativeReference
lets you imperatively load a new entrypoint (its naming sucks!)Not really sure yet about the syntax.
{ kind: 'NotLoaded', load: () => void } | { kind: 'Loading' } | { kind: 'Loaded', data, dispose: () => void }
Open questions