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

graphql-import

Package Overview
Dependencies
Maintainers
1
Versions
431
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-import - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

10

dist/definition.js

@@ -13,3 +13,3 @@ "use strict";

}
var collectedTypedDefinitions = collectNewTypeDefinitions(defintionPool, newDefinition, schemaMap, schemaPath);
var collectedTypedDefinitions = collectNewTypeDefinitions(allDefinitions, defintionPool, newDefinition, schemaMap, schemaPath);
newTypeDefinitions.push.apply(newTypeDefinitions, collectedTypedDefinitions);

@@ -22,3 +22,3 @@ defintionPool.push.apply(defintionPool, collectedTypedDefinitions);

exports.completeDefinitionPool = completeDefinitionPool;
function collectNewTypeDefinitions(definitionPool, newDefinition, schemaMap, schemaPath) {
function collectNewTypeDefinitions(allDefinitions, definitionPool, newDefinition, schemaMap, schemaPath) {
var newTypeDefinitions = [];

@@ -41,2 +41,3 @@ if (newDefinition.kind === 'InputObjectTypeDefinition') {

if (newDefinition.kind === 'InterfaceTypeDefinition') {
var interfaceName_1 = newDefinition.name.value;
newDefinition.fields.forEach(function (field) {

@@ -54,2 +55,7 @@ var namedType = getNamedType(field.type);

});
var interfaceImplementations = allDefinitions.filter(function (d) {
return d.kind === 'ObjectTypeDefinition' &&
d.interfaces.some(function (i) { return i.name.value === interfaceName_1; });
});
newTypeDefinitions.push.apply(newTypeDefinitions, interfaceImplementations);
}

@@ -56,0 +62,0 @@ if (newDefinition.kind === 'UnionTypeDefinition') {

4

dist/index.test.js

@@ -66,2 +66,6 @@ "use strict";

});
ava_1.default('importSchema: interfaces-implements', function (t) {
var expectedSDL = "type A implements B {\n id: ID!\n}\n\ninterface B {\n id: ID!\n}\n\ntype B1 implements B {\n id: ID!\n}\n";
t.is(_1.importSchema('fixtures/interfaces-implements/a.graphql'), expectedSDL);
});
ava_1.default('importSchema: input types', function (t) {

@@ -68,0 +72,0 @@ var expectedSDL = "type A {\n first(b: B): String @first\n second: Float\n}\n\ninput B {\n hello: [C!]!\n}\n\ninput C {\n id: ID!\n}\n";

{
"name": "graphql-import",
"version": "0.1.4",
"version": "0.1.5",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": "git@github.com:graphcool/graphql-import.git",

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