You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`createGraphiQLFetcher` now only attempts an `graphql-ws` connection when only `subscriptionUrl` is provided. In order to use `graphql-transport-ws`, you'll need to provide the `legacyClient` option only, and no `subscriptionUrl` or `wsClient` option.
`createGraphiQLFetcher` now only attempts an `graphql-ws` connection when only `subscriptionUrl` is provided. In order to use `graphql-transport-ws`, you'll need to provide the `legacyClient` option only, and no `subscriptionUrl` or `wsClient` option.
Copy file name to clipboardExpand all lines: packages/graphiql-toolkit/README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,16 @@
2
2
3
3
General purpose library as a dependency of GraphiQL.
4
4
5
-
The goal is to make this and related packages a set of general purpose tools used to build an end implementation like GraphiQL
5
+
Part of the GraphiQL 2.0.0 initiative.
6
6
7
-
It also allows us to share utilities, libraries and components that can be used by
7
+
## Docs
8
+
9
+
-**`createFetcher`[(Docs)](./docs/create-fetcher.md)** : a utility for creating a `fetcher` prop implementation for HTTP GET, POST including multipart, websockets fetcher
10
+
- more to come!
8
11
9
12
## Todo
10
13
11
14
-[x] Begin porting common type definitions used by GraphiQL and it's dependencies
12
-
-[ ]Port over the GraphiQL components library created by @walaura and designed by @orta
15
+
-[ ]`createFetcher` utility for an easier `fetcher`
13
16
-[ ] Migrate over general purpose `graphiql/src/utilities`
14
-
-[ ] Frontend framework agnostic state implementation
15
-
-[ ] React components and hooks? Or should react specifics live seperately?
17
+
-[ ] Utility to generate json schema spec from `getQueryFacts` for monaco, vscode, etc
Copy file name to clipboardExpand all lines: packages/graphiql-toolkit/docs/create-fetcher.md
+32-3Lines changed: 32 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,12 +79,16 @@ This is url used for all `HTTP` requests, and for schema introspection.
79
79
80
80
#### `subscriptionUrl`
81
81
82
-
This generates a `graphql-ws` client.
82
+
This generates a `graphql-ws` client using the provided url. Note that a server must be compatible with the new `graphql-ws` subscriptions spec for this to work.
83
83
84
84
#### `wsClient`
85
85
86
86
provide your own subscriptions client. bypasses `subscriptionUrl`. In theory, this could be any client using any transport, as long as it matches `graphql-ws``Client` signature.
87
87
88
+
#### `legacyClient`
89
+
90
+
provide a legacy subscriptions client. bypasses `subscriptionUrl`. In theory, this could be any client using any transport, as long as it matches `subscriptions-transport-ws``Client` signature.
91
+
88
92
#### `headers`
89
93
90
94
Pass headers to any and all requests
@@ -97,7 +101,7 @@ Pass a custom fetch implementation such as `isomorphic-feth`
0 commit comments