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

graphql-import

Package Overview
Dependencies
Maintainers
3
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.4.1 to 0.4.2

4

dist/definition.js

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

if (!definitionPool.some(function (d) { return d.name.value === nodeTypeName; }) &&
!builtinTypes.includes(nodeTypeName)) {
!lodash_1.includes(builtinTypes, nodeTypeName)) {
var argTypeMatch = schemaMap[nodeTypeName];

@@ -111,3 +111,3 @@ if (!argTypeMatch) {

if (!definitionPool.some(function (d) { return d.name.value === directiveName; }) &&
!builtinDirectives.includes(directiveName)) {
!lodash_1.includes(builtinDirectives, directiveName)) {
var directive_1 = schemaMap[directiveName];

@@ -114,0 +114,0 @@ if (!directive_1) {

@@ -66,4 +66,4 @@ "use strict";

var typesToFilter = ['Query', 'Mutation', 'Subscription'];
var firstTypes = lodash_1.flatten(typeDefinitions).filter(function (d) { return typesToFilter.includes(d.name.value); });
var otherFirstTypes = typeDefinitions[0].filter(function (d) { return !typesToFilter.includes(d.name.value); });
var firstTypes = lodash_1.flatten(typeDefinitions).filter(function (d) { return lodash_1.includes(typesToFilter, d.name.value); });
var otherFirstTypes = typeDefinitions[0].filter(function (d) { return !lodash_1.includes(typesToFilter, d.name.value); });
var firstSet = otherFirstTypes.concat(firstTypes);

@@ -73,3 +73,3 @@ var processedTypeNames = [];

var _loop_1 = function (type) {
if (!processedTypeNames.includes(type.name.value)) {
if (!lodash_1.includes(processedTypeNames, type.name.value)) {
processedTypeNames.push(type.name.value);

@@ -176,7 +176,7 @@ mergedFirstTypes.push(type);

var filteredDefinitions = filterTypeDefinitions(typeDefinitions);
if (imports.includes('*')) {
if (lodash_1.includes(imports, '*')) {
return filteredDefinitions;
}
else {
var result = filteredDefinitions.filter(function (d) { return imports.map(function (i) { return i.split('.')[0]; }).includes(d.name.value); });
var result = filteredDefinitions.filter(function (d) { return lodash_1.includes(imports.map(function (i) { return i.split('.')[0]; }), d.name.value); });
var fieldImports = imports

@@ -189,3 +189,3 @@ .filter(function (i) { return i.split('.').length > 1; });

filteredDefinitions.find(function (def) { return def.name.value === rootType; }).fields
.filter(function (f) { return fields.includes(f.name.value) || fields.includes('*'); });
.filter(function (f) { return lodash_1.includes(fields, f.name.value) || lodash_1.includes(fields, '*'); });
};

@@ -215,5 +215,5 @@ for (var rootType in groupedFieldImports) {

return definitions
.filter(function (d) { return validKinds.includes(d.kind); })
.filter(function (d) { return lodash_1.includes(validKinds, d.kind); })
.map(function (d) { return d; });
}
//# sourceMappingURL=index.js.map
{
"name": "graphql-import",
"version": "0.4.1",
"version": "0.4.2",
"engines": {
"node": ">=4.0.0"
},
"license": "MIT",

@@ -42,6 +45,6 @@ "repository": "git@github.com:graphcool/graphql-import.git",

"devDependencies": {
"@types/node": "8.5.8",
"@types/graphql": "0.11.8",
"@types/lodash": "4.14.92",
"ava": "0.24.0",
"@types/node": "8.5.9",
"@types/graphql": "0.12.3",
"@types/lodash": "4.14.98",
"ava": "0.25.0",
"ava-ts": "0.24.0",

@@ -48,0 +51,0 @@ "nyc": "11.4.1",

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