Skip to content

Commit

Permalink
fix(next-urql): Change import for init-urql-client to @urql/core to p…
Browse files Browse the repository at this point in the history
…revent it from using createContext (#2833)

Co-authored-by: Phil Pluckthun <phil@kitten.sh>
  • Loading branch information
SleeplessOne1917 and kitten authored Dec 1, 2022
1 parent c89f13a commit 0bd397d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/beige-fishes-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'next-urql': patch
---

Change import for `createClient` to `@urql/core`, which helps Next not depend on `urql` and hence not cause `createContext` to be called when the import is treeshaken away.
2 changes: 1 addition & 1 deletion packages/next-urql/src/init-urql-client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createClient, Client, ClientOptions } from 'urql';
import { Client, ClientOptions, createClient } from '@urql/core';

let urqlClient: Client | null = null;

Expand Down

0 comments on commit 0bd397d

Please sign in to comment.