We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a604bd commit 29b7d72Copy full SHA for 29b7d72
app/lib/urql.tsx
@@ -18,13 +18,13 @@ export function UrqlProvider(props: { children: React.ReactNode }) {
18
return headers;
19
}
20
21
- const [client] = React.useState(() =>
22
- createClient({
+ const [client] = React.useState(function createUrqlClient() {
+ return createClient({
23
url: `${process.env.NEXT_PUBLIC_SUPABASE_URL!}/rest/v1/rpc/graphql`,
24
- fetchOptions: {
25
- headers: getHeaders(),
+ fetchOptions: function createFetchOptions() {
+ return { headers: getHeaders() };
26
},
27
- })
28
- );
+ });
29
return <Provider value={client}>{props.children}</Provider>;
30
0 commit comments