Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-config

Package Overview
Dependencies
Maintainers
4
Versions
320
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-config - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

lib/__tests__/introspection-query/getSchema.d.ts

7

lib/utils.d.ts

@@ -1,2 +0,2 @@

import { GraphQLSchema } from 'graphql';
import { GraphQLSchema, IntrospectionQuery } from 'graphql';
import { GraphQLConfigData, IntrospectionResult } from './types';

@@ -10,3 +10,6 @@ export declare function readConfig(configPath: string): GraphQLConfigData;

export declare function schemaToIntrospection(schema: GraphQLSchema): Promise<IntrospectionResult>;
export declare function introspectionToSchema(introspection: IntrospectionResult): GraphQLSchema;
export declare function introspectionToSchema(introspection: IntrospectionResult | (IntrospectionQuery & {
errors: undefined;
data: undefined;
})): GraphQLSchema;
export declare function readSchema(path: any): GraphQLSchema;

@@ -13,0 +16,0 @@ export declare function writeSchema(path: string, schema: GraphQLSchema, schemaExtensions?: {

@@ -124,10 +124,9 @@ "use strict";

exports.schemaToIntrospection = schemaToIntrospection;
// Predicate for errors/data can be removed after typescript 2.7.
// See: https://github.com/Microsoft/TypeScript/pull/19513
function introspectionToSchema(introspection) {
if (introspection.errors != null) {
throw new Error('Introspection result containts errors');
throw new Error('Introspection result contains errors');
}
if (introspection.data == null) {
throw new Error('Missing "data" property from introspection result');
}
return graphql_1.buildClientSchema(introspection.data);
return graphql_1.buildClientSchema(introspection.data ? introspection.data : introspection);
}

@@ -134,0 +133,0 @@ exports.introspectionToSchema = introspectionToSchema;

{
"name": "graphql-config",
"version": "1.1.2",
"version": "1.1.3",
"description": "The easiest way to configure your development environment with your GraphQL schema (supported by most tools, editors & IDEs)",

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

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