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.7.0 to 0.7.1-canary-d5a222ad.0

10

CHANGELOG.md
# @graphiql/toolkit
## 0.7.1-canary-d5a222ad.0
### Patch Changes
- [#2737](https://github.com/graphql/graphiql/pull/2737) [`5f53c5e2`](https://github.com/graphql/graphiql/commit/5f53c5e2512e6f0f25bf9dca71aeceefa2e93fb9) Thanks [@thomasheyenbrock](https://github.com/thomasheyenbrock)! - Handle execution when there is no document AST (because the query editor is empty or the query string contains syntax errors)
## 0.7.0

@@ -7,3 +13,3 @@

- [#2523](https://github.com/graphql/graphiql/pull/2523) [`01cd313b`](https://github.com/graphql/graphiql/commit/01cd313bcb4f3d0c1b9f7539917225803f2109e3) Thanks [@thomasheyenbrock](https://github.com/thomasheyenbrock)! - BREAKING: Don't pass `shouldPersistHeaders` anymore when invoking the fetcher function. This value can be looked up by consuming the `EditorContext`:
- [#2694](https://github.com/graphql/graphiql/pull/2694) [`e59ec32e`](https://github.com/graphql/graphiql/commit/e59ec32e7ccdf3f7f68656533555c63620826279) Thanks [@acao](https://github.com/acao)! - BREAKING: Don't pass `shouldPersistHeaders` anymore when invoking the fetcher function. This value can be looked up by consuming the `EditorContext`:

@@ -19,3 +25,3 @@ ```js

* [#2523](https://github.com/graphql/graphiql/pull/2523) [`41236709`](https://github.com/graphql/graphiql/commit/41236709749829ac69ffdc8cd81eb7a96e1695c6) Thanks [@thomasheyenbrock](https://github.com/thomasheyenbrock)! - Add a `clear` method to `Storage` classes
* [#2694](https://github.com/graphql/graphiql/pull/2694) [`e59ec32e`](https://github.com/graphql/graphiql/commit/e59ec32e7ccdf3f7f68656533555c63620826279) Thanks [@acao](https://github.com/acao)! - Add a `clear` method to `Storage` classes

@@ -22,0 +28,0 @@ ## 0.6.1

4

dist/create-fetcher/createFetcher.js

@@ -29,3 +29,5 @@ "use strict";

}
var isSubscription = (0, lib_1.isSubscriptionWithName)(fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.documentAST, graphQLParams.operationName || undefined);
var isSubscription = (fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.documentAST)
? (0, lib_1.isSubscriptionWithName)(fetcherOpts.documentAST, graphQLParams.operationName || undefined)
: false;
if (isSubscription) {

@@ -32,0 +34,0 @@ if (!wsFetcher) {

@@ -94,2 +94,19 @@ ## Create Fetcher

### `wsConnectionParams`
provide your initial connection params.
```ts
const fetcher = createGraphiQLFetcher({
url: "https://localhost:3000",
subscriptionUrl: "https://localhost:3001",
wsConnectionParams: { Authorization: "token 1234" }
})
const App () {
return <GraphiQL fetcher={fetcher} />
}
```
#### `legacyWsClient` or `legacyClient`

@@ -96,0 +113,0 @@

@@ -26,3 +26,5 @@ import { createMultipartFetcher, createSimpleFetcher, isSubscriptionWithName, getWsFetcher, } from './lib';

}
const isSubscription = isSubscriptionWithName(fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.documentAST, graphQLParams.operationName || undefined);
const isSubscription = (fetcherOpts === null || fetcherOpts === void 0 ? void 0 : fetcherOpts.documentAST)
? isSubscriptionWithName(fetcherOpts.documentAST, graphQLParams.operationName || undefined)
: false;
if (isSubscription) {

@@ -29,0 +31,0 @@ if (!wsFetcher) {

{
"name": "@graphiql/toolkit",
"version": "0.7.0",
"version": "0.7.1-canary-d5a222ad.0",
"description": "Utility to build a fetcher for GraphiQL",

@@ -5,0 +5,0 @@ "contributors": [

@@ -50,6 +50,8 @@ import type { Fetcher, CreateFetcherOptions } from './types';

}
const isSubscription = isSubscriptionWithName(
fetcherOpts?.documentAST!,
graphQLParams.operationName || undefined,
);
const isSubscription = fetcherOpts?.documentAST
? isSubscriptionWithName(
fetcherOpts.documentAST,
graphQLParams.operationName || undefined,
)
: false;
if (isSubscription) {

@@ -56,0 +58,0 @@ if (!wsFetcher) {

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