-
Hello everyone. Please how can I integrate urql with the new Next.js 13.2? |
Beta Was this translation helpful? Give feedback.
Answered by
hgiasac
Mar 25, 2023
Replies: 1 comment 1 reply
-
The import {
Client,
createClient,
dedupExchange,
fetchExchange,
} from "@urql/core";
const client = createClient({
URL: "https://example.com/v1/graphql",
exchanges: [dedupExchange, fetchExchange],
});
const result = await client.query(GetUsersDocument).toPromise(); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
JoviDeCroock
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
urql
package is tightly coupled with React. The library initializes a React Context at startup that causes exceptions on the server side. You must create the client from the@urql/core
package in the server component instead. Avoid importingurql
in the file.