Socket
Socket
Sign inDemoInstall

@graphiql/toolkit

Package Overview
Dependencies
Maintainers
2
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphiql/toolkit - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

dist/createFetcher.d.ts

6

CHANGELOG.md
# @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 @@

1

dist/index.d.ts
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc