Skip to content

Behaviour when using suspense true on client side but specific urql queries having suspense turned off with context param #1662

Answered by JoviDeCroock
Biboswan asked this question in Q&A
Discussion options

You must be logged in to vote

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}/>;
}

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Biboswan
Comment options

@JoviDeCroock
Comment options

@Biboswan
Comment options

@kitten
Comment options

Answer selected by JoviDeCroock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants