New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

graphql-config-parser

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-config-parser - npm Package Compare versions

Comparing version 0.1.1 to 1.0.0

2

package.json
{
"name": "graphql-config-parser",
"version": "0.1.1",
"version": "1.0.0",
"description": "The easiest way to configure your development environment with your GraphQL schema (supported by most tools, editors & IDEs)",

@@ -5,0 +5,0 @@ "main": "src/index.js",

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

method: 'POST',
body: JSON.stringify(introspectionQuery_1.introspectionQuery),
body: JSON.stringify({
query: introspectionQuery_1.introspectionQuery,
}),
headers: Object.assign({

@@ -60,4 +62,15 @@ 'Content-Type': 'application/json',

.then((res) => {
console.log(`Loaded GraphQL schema from ${configRequest.url}`);
return res.json();
if (res.ok) {
return res.json()
.then((schema) => {
console.log(`Loaded GraphQL schema from ${configRequest.url}`);
return schema;
});
}
else {
return res.text()
.then((text) => {
throw new Error(`${res.statusText}: ${text}`);
});
}
});

@@ -64,0 +77,0 @@ default: throw new Error(`Invalid config: ${JSON.stringify(config)}`);

@@ -66,3 +66,5 @@ import { isWebUri } from 'valid-url'

method: 'POST',
body: JSON.stringify(introspectionQuery),
body: JSON.stringify({
query: introspectionQuery,
}),
headers: Object.assign(

@@ -76,4 +78,14 @@ {

.then((res) => {
console.log(`Loaded GraphQL schema from ${configRequest.url}`)
return res.json()
if (res.ok) {
return res.json()
.then((schema) => {
console.log(`Loaded GraphQL schema from ${configRequest.url}`)
return schema
})
} else {
return res.text()
.then((text) => {
throw new Error(`${res.statusText}: ${text}`)
})
}
})

@@ -80,0 +92,0 @@ default: throw new Error(`Invalid config: ${JSON.stringify(config)}`)

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