@graphql-tools/import
Advanced tools
Comparing version 7.0.0 to 7.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb
@@ -5,7 +5,7 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const graphql_1 = require("graphql"); | ||
const fs_1 = require("fs"); | ||
const path_1 = require("path"); | ||
const process_1 = require("process"); | ||
const graphql_1 = require("graphql"); | ||
const resolve_from_1 = tslib_1.__importDefault(require("resolve-from")); | ||
const process_1 = require("process"); | ||
const utils_1 = require("@graphql-tools/utils"); | ||
@@ -133,3 +133,4 @@ const builtinTypes = ['String', 'Float', 'Int', 'Boolean', 'ID', 'Upload']; | ||
// If that dependency cannot be found both in imports and this file, throw an error | ||
if (!allImportedDefinitionsMap.has(dependencyName) && !definitionsByName.has(dependencyName)) { | ||
if (!allImportedDefinitionsMap.has(dependencyName) && | ||
!definitionsByName.has(dependencyName)) { | ||
throw new Error(`Couldn't find type ${dependencyName} in any of the schemas.`); | ||
@@ -440,3 +441,4 @@ } | ||
typeName, | ||
...(node.interfaces?.map((namedTypeNode) => namedTypeNode.name.value) || []), | ||
...(node.interfaces?.map((namedTypeNode) => namedTypeNode.name.value) || | ||
[]), | ||
]; | ||
@@ -443,0 +445,0 @@ node.interfaces?.forEach((namedTypeNode) => { |
@@ -1,6 +0,6 @@ | ||
import { Source, parse, Kind, print, } from 'graphql'; | ||
import { readFileSync, realpathSync } from 'fs'; | ||
import { dirname, join, isAbsolute } from 'path'; | ||
import { dirname, isAbsolute, join } from 'path'; | ||
import { cwd as cwdFactory } from 'process'; | ||
import { Kind, parse, print, Source, } from 'graphql'; | ||
import resolveFrom from 'resolve-from'; | ||
import { cwd as cwdFactory } from 'process'; | ||
import { parseGraphQLSDL } from '@graphql-tools/utils'; | ||
@@ -127,3 +127,4 @@ const builtinTypes = ['String', 'Float', 'Int', 'Boolean', 'ID', 'Upload']; | ||
// If that dependency cannot be found both in imports and this file, throw an error | ||
if (!allImportedDefinitionsMap.has(dependencyName) && !definitionsByName.has(dependencyName)) { | ||
if (!allImportedDefinitionsMap.has(dependencyName) && | ||
!definitionsByName.has(dependencyName)) { | ||
throw new Error(`Couldn't find type ${dependencyName} in any of the schemas.`); | ||
@@ -430,3 +431,4 @@ } | ||
typeName, | ||
...(node.interfaces?.map((namedTypeNode) => namedTypeNode.name.value) || []), | ||
...(node.interfaces?.map((namedTypeNode) => namedTypeNode.name.value) || | ||
[]), | ||
]; | ||
@@ -433,0 +435,0 @@ node.interfaces?.forEach((namedTypeNode) => { |
{ | ||
"name": "@graphql-tools/import", | ||
"version": "7.0.0", | ||
"version": "7.0.1-alpha-20240222154539-b27ae8605c354eed2b24844a475c8889ccc90dfb", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -10,3 +10,3 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@graphql-tools/utils": "^10.0.0", | ||
"@graphql-tools/utils": "^10.0.13", | ||
"resolve-from": "5.0.0", | ||
@@ -13,0 +13,0 @@ "tslib": "^2.4.0" |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
62465
1171
2