@graphiql/toolkit
Advanced tools
Comparing version 0.3.0 to 0.3.1
# @graphiql/toolkit | ||
## 0.3.1 | ||
### Patch Changes | ||
- [`62e786b5`](https://github.com/graphql/graphiql/commit/62e786b57cc5748eccac59814dfc8ecd0104c748) [#1990](https://github.com/graphql/graphiql/pull/1990) Thanks [@acao](https://github.com/acao)! - Remove type definition from `subscriptions-transport-ws` | ||
## 0.3.0 | ||
@@ -4,0 +10,0 @@ |
import { DocumentNode } from 'graphql'; | ||
import { Client, ClientOptions } from 'graphql-ws'; | ||
import { SubscriptionClient } from 'subscriptions-transport-ws'; | ||
import type { Fetcher, FetcherResult, FetcherParams, CreateFetcherOptions } from './types'; | ||
@@ -9,5 +8,7 @@ export declare const isSubscriptionWithName: (document: DocumentNode, name: string) => boolean; | ||
export declare const createWebsocketsFetcherFromClient: (wsClient: Client) => (graphQLParams: FetcherParams) => AsyncIterableIterator<FetcherResult>; | ||
export declare const createLegacyWebsocketsFetcher: (legacyWsClient: SubscriptionClient) => (graphQLParams: FetcherParams) => AsyncIterableIterator<FetcherResult>; | ||
export declare const createLegacyWebsocketsFetcher: (legacyWsClient: { | ||
request: (params: FetcherParams) => unknown; | ||
}) => (graphQLParams: FetcherParams) => AsyncIterableIterator<FetcherResult>; | ||
export declare const createMultipartFetcher: (options: CreateFetcherOptions, httpFetch: typeof fetch) => Fetcher; | ||
export declare const getWsFetcher: (options: CreateFetcherOptions) => ((graphQLParams: FetcherParams) => AsyncIterableIterator<FetcherResult>) | undefined; | ||
//# sourceMappingURL=lib.d.ts.map |
import { DocumentNode } from 'graphql'; | ||
import { Client, ClientOptions } from 'graphql-ws'; | ||
import { SubscriptionClient } from 'subscriptions-transport-ws'; | ||
import type { Fetcher, FetcherResult, FetcherParams, CreateFetcherOptions } from './types'; | ||
@@ -9,5 +8,7 @@ export declare const isSubscriptionWithName: (document: DocumentNode, name: string) => boolean; | ||
export declare const createWebsocketsFetcherFromClient: (wsClient: Client) => (graphQLParams: FetcherParams) => AsyncIterableIterator<FetcherResult>; | ||
export declare const createLegacyWebsocketsFetcher: (legacyWsClient: SubscriptionClient) => (graphQLParams: FetcherParams) => AsyncIterableIterator<FetcherResult>; | ||
export declare const createLegacyWebsocketsFetcher: (legacyWsClient: { | ||
request: (params: FetcherParams) => unknown; | ||
}) => (graphQLParams: FetcherParams) => AsyncIterableIterator<FetcherResult>; | ||
export declare const createMultipartFetcher: (options: CreateFetcherOptions, httpFetch: typeof fetch) => Fetcher; | ||
export declare const getWsFetcher: (options: CreateFetcherOptions) => ((graphQLParams: FetcherParams) => AsyncIterableIterator<FetcherResult>) | undefined; | ||
//# sourceMappingURL=lib.d.ts.map |
{ | ||
"name": "@graphiql/toolkit", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Utility to build a fetcher for GraphiQL", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
import { DocumentNode, visit, GraphQLError } from 'graphql'; | ||
import { meros } from 'meros'; | ||
import { createClient, Client, ClientOptions } from 'graphql-ws'; | ||
import { SubscriptionClient } from 'subscriptions-transport-ws'; | ||
import { | ||
@@ -119,5 +118,5 @@ isAsyncIterable, | ||
export const createLegacyWebsocketsFetcher = ( | ||
legacyWsClient: SubscriptionClient, | ||
) => (graphQLParams: FetcherParams) => { | ||
export const createLegacyWebsocketsFetcher = (legacyWsClient: { | ||
request: (params: FetcherParams) => unknown; | ||
}) => (graphQLParams: FetcherParams) => { | ||
const observable = legacyWsClient.request(graphQLParams); | ||
@@ -124,0 +123,0 @@ return makeAsyncIterableIteratorFromSink<FetcherResult>( |
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
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
1224
397076