@graphiql/toolkit
Advanced tools
Comparing version 0.1.0 to 0.1.1
# @graphiql/toolkit | ||
## 0.1.1 | ||
### Patch Changes | ||
- [`d3278556`](https://github.com/graphql/graphiql/commit/d3278556d050d948930c4b35a73039255f9a92b7) Thanks [@harshithpabbati](https://github.com/harshithpabbati)! - Move `@graphiql/create-fetcher` to `@graphiql/toolkit` because it doesn't need to be it's own package as @imolorhe pointed out | ||
## 0.1.0 | ||
@@ -4,0 +10,0 @@ |
export * from './types'; | ||
export { createGraphiQLFetcher } from './createFetcher'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -13,3 +13,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createGraphiQLFetcher = void 0; | ||
__exportStar(require("./types"), exports); | ||
var createFetcher_1 = require("./createFetcher"); | ||
Object.defineProperty(exports, "createGraphiQLFetcher", { enumerable: true, get: function () { return createFetcher_1.createGraphiQLFetcher; } }); | ||
//# sourceMappingURL=index.js.map |
import type { DocumentNode, IntrospectionQuery } from 'graphql'; | ||
import type { Client, ClientOptions } from 'graphql-ws'; | ||
import type { SubscriptionClient } from 'subscriptions-transport-ws'; | ||
export declare type Observable<T> = { | ||
@@ -47,2 +49,13 @@ subscribe(opts: { | ||
export declare type Fetcher = (graphQLParams: FetcherParams, opts?: FetcherOpts) => FetcherReturnType; | ||
export declare type WebsocketsClient = Client | SubscriptionClient; | ||
export interface CreateFetcherOptions { | ||
url: string; | ||
subscriptionUrl?: string; | ||
wsClient?: Client; | ||
headers?: Record<string, string>; | ||
wsConnectionParams?: ClientOptions['connectionParams']; | ||
enableIncrementalDelivery?: boolean; | ||
fetch?: typeof fetch; | ||
schemaFetcher?: Fetcher; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
export * from './types'; | ||
export { createGraphiQLFetcher } from './createFetcher'; | ||
//# sourceMappingURL=index.d.ts.map |
export * from './types'; | ||
export { createGraphiQLFetcher } from './createFetcher'; | ||
//# sourceMappingURL=index.js.map |
import type { DocumentNode, IntrospectionQuery } from 'graphql'; | ||
import type { Client, ClientOptions } from 'graphql-ws'; | ||
import type { SubscriptionClient } from 'subscriptions-transport-ws'; | ||
export declare type Observable<T> = { | ||
@@ -47,2 +49,13 @@ subscribe(opts: { | ||
export declare type Fetcher = (graphQLParams: FetcherParams, opts?: FetcherOpts) => FetcherReturnType; | ||
export declare type WebsocketsClient = Client | SubscriptionClient; | ||
export interface CreateFetcherOptions { | ||
url: string; | ||
subscriptionUrl?: string; | ||
wsClient?: Client; | ||
headers?: Record<string, string>; | ||
wsConnectionParams?: ClientOptions['connectionParams']; | ||
enableIncrementalDelivery?: boolean; | ||
fetch?: typeof fetch; | ||
schemaFetcher?: Fetcher; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@graphiql/toolkit", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Utility to build a fetcher for GraphiQL", | ||
@@ -22,2 +22,12 @@ "contributors": [ | ||
"scripts": {}, | ||
"dependencies": { | ||
"graphql-ws": "^4.1.0", | ||
"subscriptions-transport-ws": "^0.9.18", | ||
"meros": "^1.1.2", | ||
"@n1ru4l/push-pull-async-iterable-iterator": "^2.0.1" | ||
}, | ||
"devDependencies": { | ||
"isomorphic-fetch": "^3.0.0", | ||
"graphql": "experimental-stream-defer" | ||
}, | ||
"keywords": [ | ||
@@ -24,0 +34,0 @@ "graphql", |
export * from './types'; | ||
export { createGraphiQLFetcher } from './createFetcher'; | ||
// TODO: move the most useful utilities from graphiql to here |
import type { DocumentNode, IntrospectionQuery } from 'graphql'; | ||
import type { Client, ClientOptions } from 'graphql-ws'; | ||
import type { SubscriptionClient } from 'subscriptions-transport-ws'; | ||
@@ -70,1 +72,49 @@ export type Observable<T> = { | ||
) => FetcherReturnType; | ||
export type WebsocketsClient = Client | SubscriptionClient; | ||
/** | ||
* Options for creating a simple, spec-compliant GraphiQL fetcher | ||
*/ | ||
export interface CreateFetcherOptions { | ||
/** | ||
* url for HTTP(S) requests. required! | ||
*/ | ||
url: string; | ||
/** | ||
* url for websocket subscription requests | ||
*/ | ||
subscriptionUrl?: string; | ||
/** | ||
* `wsClient` implementation that matches `ws-graphql` signature, | ||
* whether via `createClient()` itself or another client. | ||
*/ | ||
wsClient?: Client; | ||
/** | ||
* Headers you can provide statically. | ||
* | ||
* If you enable the headers editor and the user provides | ||
* A header you set statically here, it will be overriden by their value. | ||
*/ | ||
headers?: Record<string, string>; | ||
/** | ||
* Websockets connection params used when you provide subscriptionUrl. graphql-ws `ClientOptions.connectionParams` | ||
*/ | ||
wsConnectionParams?: ClientOptions['connectionParams']; | ||
/** | ||
* You can disable the usage of the `fetch-multipart-graphql` library | ||
* entirely, defaulting to a simple fetch POST implementation. | ||
*/ | ||
enableIncrementalDelivery?: boolean; | ||
/** | ||
* The fetch implementation, in case the user needs to override this for SSR | ||
* or other purposes. this does not override the `fetch-multipart-graphql` | ||
* default fetch behavior yet. | ||
*/ | ||
fetch?: typeof fetch; | ||
/** | ||
* An optional custom fetcher specifically for your schema. For most cases | ||
* the `url` and `headers` property should have you covered. | ||
*/ | ||
schemaFetcher?: Fetcher; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
387538
47
1098
4
2
1
+ Addedgraphql-ws@^4.1.0
+ Addedmeros@^1.1.2
+ Added@n1ru4l/push-pull-async-iterable-iterator@2.1.4(transitive)
+ Addedbacko2@1.0.2(transitive)
+ Addedeventemitter3@3.1.2(transitive)
+ Addedgraphql@15.9.0(transitive)
+ Addedgraphql-ws@4.9.0(transitive)
+ Addediterall@1.3.0(transitive)
+ Addedmeros@1.3.0(transitive)
+ Addedsubscriptions-transport-ws@0.9.19(transitive)
+ Addedsymbol-observable@1.2.0(transitive)
+ Addedws@7.5.10(transitive)