feat: createFetcher legacyClient option, simplify, docs#1819
Conversation
🦋 Changeset detectedLatest commit: 0f1d417 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report
@@ Coverage Diff @@
## main #1819 +/- ##
==========================================
+ Coverage 65.66% 65.70% +0.03%
==========================================
Files 85 85
Lines 5115 5106 -9
Branches 1635 1631 -4
==========================================
- Hits 3359 3355 -4
+ Misses 1752 1747 -5
Partials 4 4
Continue to review full report at Codecov.
|
|
@junminstorage would this unblock you? |
|
Yes, it does. having client to inject its own wsClient or legacyClient is great so createFetcher util can have the flexibility of not tied to any versions of clients if upgrades are needed. |
|
@junminstorage should we specify |
|
I am not super familiar with the difference between those two, it looks like peerDependency is better fit since the create-fetcher's lib.ts imports the two clients, and the legacy client is only used for type checking, so is it devDependency? |
yes good thinking. the legacy client should be a |
hopefully fixes #1800
createGraphiQLFetchershould have alegacyClientoverride option as has been noted by some userscreateGraphiQLFetchernow only attempts angraphql-wsconnection when onlysubscriptionsUrlis provided.connectionParamswithsubscriptionsUrlcreateGraphiQLFetchertocreateFetcheras a breaking change?