graphql-import
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -0,0 +0,0 @@ import { TypeDefinitionNode } from 'graphql'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ /** |
@@ -84,3 +84,3 @@ "use strict"; | ||
if (allDefinitions === void 0) { allDefinitions = []; } | ||
var key = path.basename(filePath); | ||
var key = path.resolve(filePath); | ||
var dirname = path.dirname(filePath); | ||
@@ -102,4 +102,4 @@ // Get TypeDefinitionNodes from current schema | ||
// If it was not yet processed (in case of circular dependencies) | ||
if (!processedFiles.has(path.basename(m.from))) { | ||
var moduleFilePath = path.resolve(path.join(dirname, m.from)); | ||
var moduleFilePath = path.resolve(path.join(dirname, m.from)); | ||
if (!processedFiles.has(moduleFilePath)) { | ||
collectDefinitions(m.imports, read(moduleFilePath), moduleFilePath, processedFiles, typeDefinitions, allDefinitions); | ||
@@ -106,0 +106,0 @@ } |
@@ -89,2 +89,7 @@ "use strict"; | ||
}); | ||
ava_1.default('relative paths', function (t) { | ||
var expectedSDL = "type Query {\n feed: [Post!]!\n}\n\ntype Mutation {\n createDraft(title: String!, text: String): Post\n publish(id: ID!): Post\n}\n\ntype Post implements Node {\n id: ID!\n isPublished: Boolean!\n title: String!\n text: String!\n}\n\ninterface Node {\n id: ID!\n}\n"; | ||
var actualSDL = _1.importSchema('fixtures/relative-paths/src/schema.graphql'); | ||
t.is(actualSDL, expectedSDL); | ||
}); | ||
//# sourceMappingURL=index.test.js.map |
{ | ||
"name": "graphql-import", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:graphcool/graphql-import.git", |
@@ -0,0 +0,0 @@ # graphql-import [![Build Status](https://travis-ci.org/graphcool/graphql-import.svg?branch=master)](https://travis-ci.org/graphcool/graphql-import) [![npm version](https://badge.fury.io/js/graphql-import.svg)](https://badge.fury.io/js/graphql-import) [![Greenkeeper badge](https://badges.greenkeeper.io/graphcool/graphql-import.svg)](https://greenkeeper.io/) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36083
427
1