Behaviour when using suspense true on client side but specific urql queries having suspense turned off with context param #1662
-
Giving a minimal viable example It seems to me in the case mentioned here some somewhat <Suspense fallback={<Spinner/>}>
<ComponentA />
</Suspense>
const ComponentA = () => {
const [dataA, isLoadingDataA] = useQuery({query:queryA,variables:..., context: {suspense:false}})
const [dataB, isLoadingDataB] = useQuery({query:queryB,variables:...})
if (isLoadingA) { return <Spinner2/>};
return <ComponentB dataA={dataA} dataB={dataB}/>
} |
Beta Was this translation helpful? Give feedback.
Answered by
JoviDeCroock
May 21, 2021
Replies: 1 comment 4 replies
-
That's not how our query-signature looks.... it's in the basics section of the docs const ComponentA = () => {
const [resultA] = useQuery({
query:queryA,
context: React.useMemo(function () { return { suspense:false } }, [])
});
const [resultB] = useQuery({ query:queryB });
if (resultA.fetching) return <Spinner2/>;
return <ComponentB dataA={resultA.data} dataB={resultB.data}/>;
} |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
JoviDeCroock
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's not how our query-signature looks.... it's in the basics section of the docs