Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@graphql-ez/client

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-ez/client - npm Package Compare versions

Comparing version
0.6.1
to
0.6.2
+13
-12
index.js

@@ -5,12 +5,12 @@ 'use strict';

const clientURI = require('@graphql-ez/utils/clientURI');
const object = require('@graphql-ez/utils/object');
const url = require('@graphql-ez/utils/url');
const undici = require('undici');
const sse = require('./sse.js');
const stream = require('./stream.js');
const upload = require('./upload.js');
const utils = require('./utils.js');
const graphqlWs = require('./websockets/graphql-ws.js');
const subscriptionsTransport = require('./websockets/subscriptions-transport.js');
var clientURI = require('@graphql-ez/utils/clientURI');
var object = require('@graphql-ez/utils/object');
var url = require('@graphql-ez/utils/url');
var undici = require('undici');
var sse = require('./sse.js');
var stream = require('./stream.js');
var upload = require('./upload.js');
var utils = require('./utils.js');
var graphqlWs = require('./websockets/graphql-ws.js');
var subscriptionsTransport = require('./websockets/subscriptions-transport.js');

@@ -50,3 +50,2 @@ class GraphQLErrorJSON extends Error {

const query = async function query2(document, { variables, headers: headersArg, method = "POST", extensions, operationName, requestOptions } = {}) {
var _a;
const { body, headers: headers2 } = await client.request(

@@ -69,3 +68,5 @@ method === "GET" ? {

);
if (!((_a = headers2["content-type"]) == null ? void 0 : _a.startsWith("application/json"))) {
const contentType = headers2["content-type"];
const contentTypeString = Array.isArray(contentType) ? contentType[0] : contentType;
if (!(contentTypeString == null ? void 0 : contentTypeString.startsWith("application/json"))) {
const errorBody = await body.text().catch(() => null) || "No body";

@@ -72,0 +73,0 @@ throw Error(`Unexpected content type received: ${headers2["content-type"]}, BodyText: ${errorBody}`);

@@ -45,3 +45,2 @@ import { documentParamsToURIParams } from '@graphql-ez/utils/clientURI';

const query = async function query2(document, { variables, headers: headersArg, method = "POST", extensions, operationName, requestOptions } = {}) {
var _a;
const { body, headers: headers2 } = await client.request(

@@ -64,3 +63,5 @@ method === "GET" ? {

);
if (!((_a = headers2["content-type"]) == null ? void 0 : _a.startsWith("application/json"))) {
const contentType = headers2["content-type"];
const contentTypeString = Array.isArray(contentType) ? contentType[0] : contentType;
if (!(contentTypeString == null ? void 0 : contentTypeString.startsWith("application/json"))) {
const errorBody = await body.text().catch(() => null) || "No body";

@@ -67,0 +68,0 @@ throw Error(`Unexpected content type received: ${headers2["content-type"]}, BodyText: ${errorBody}`);

{
"name": "@graphql-ez/client",
"version": "0.6.1",
"version": "0.6.2",
"sideEffects": false,

@@ -16,4 +16,4 @@ "peerDependencies": {

"dependencies": {
"@graphql-ez/utils": "^0.2.0",
"undici": "^5.14.0"
"undici": "^5.14.0",
"@graphql-ez/utils": "^0.2.1"
},

@@ -33,2 +33,3 @@ "repository": {

".": {
"types": "./index.d.ts",
"require": "./index.js",

@@ -38,2 +39,3 @@ "import": "./index.mjs"

"./*": {
"types": "./*.d.ts",
"require": "./*.js",

@@ -40,0 +42,0 @@ "import": "./*.mjs"

+3
-3

@@ -5,5 +5,5 @@ 'use strict';

const promise = require('@graphql-ez/utils/promise');
const graphql = require('graphql');
const utils = require('./utils.js');
var promise = require('@graphql-ez/utils/promise');
var graphql = require('graphql');
var utils = require('./utils.js');

@@ -10,0 +10,0 @@ function createSSESubscription(href, getHeaders) {

@@ -5,6 +5,6 @@ 'use strict';

const promise = require('@graphql-ez/utils/promise');
const assert = require('assert');
const stream = require('stream');
const utils = require('./utils.js');
var promise = require('@graphql-ez/utils/promise');
var assert = require('assert');
var stream = require('stream');
var utils = require('./utils.js');

@@ -11,0 +11,0 @@ function createStreamHelper(pool, path, getHeaders) {

@@ -5,4 +5,4 @@ 'use strict';

const fs = require('fs');
const utils = require('./utils.js');
var fs = require('fs');
var utils = require('./utils.js');

@@ -9,0 +9,0 @@ function createUploadQuery(endpoint, getHeaders, defaultQuery) {

@@ -5,4 +5,4 @@ 'use strict';

const promise = require('@graphql-ez/utils/promise');
const graphql = require('graphql');
var promise = require('@graphql-ez/utils/promise');
var graphql = require('graphql');

@@ -9,0 +9,0 @@ const lazyDeps = promise.LazyPromise(() => Promise.resolve().then(function () { return require('./deps.js'); }));

@@ -5,4 +5,4 @@ 'use strict';

const promise = require('@graphql-ez/utils/promise');
const utils = require('../utils.js');
var promise = require('@graphql-ez/utils/promise');
var utils = require('../utils.js');

@@ -9,0 +9,0 @@ function createGraphQLWSWebsocketsClient(wsEndpoint, options = {}) {

@@ -5,4 +5,4 @@ 'use strict';

const promise = require('@graphql-ez/utils/promise');
const utils = require('../utils.js');
var promise = require('@graphql-ez/utils/promise');
var utils = require('../utils.js');

@@ -9,0 +9,0 @@ function createSubscriptionsTransportWebsocketsClient(wsEndpoint, options = {}) {

Sorry, the diff of this file is too big to display