graphql-mini-transforms
Advanced tools
Comparing version 0.0.0-snapshot-20230123204242 to 0.0.0-snapshot-20230124191425
@@ -6,2 +6,3 @@ 'use strict'; | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var graphql = require('graphql'); | ||
@@ -33,4 +34,4 @@ var document = require('./document.js'); | ||
async function loadDocument(path, build) { | ||
const rawSource = await fs__default["default"].promises.readFile(path); | ||
async function loadDocument(path$1, build) { | ||
const rawSource = await fs__default["default"].promises.readFile(path$1); | ||
const normalizedSource = typeof rawSource === 'string' ? rawSource : rawSource.toString(); | ||
@@ -49,7 +50,8 @@ const { | ||
const resolved = await build.resolve(imported, { | ||
kind: 'import-statement' | ||
kind: 'import-statement', | ||
resolveDir: path.dirname(path$1) | ||
}); | ||
if (resolved.errors.length > 0) { | ||
throw new Error(resolved.errors.join(',')); | ||
throw new Error(JSON.stringify(resolved.errors, null, 2)); | ||
} | ||
@@ -56,0 +58,0 @@ |
{ | ||
"name": "graphql-mini-transforms", | ||
"version": "0.0.0-snapshot-20230123204242", | ||
"version": "0.0.0-snapshot-20230124191425", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Transformers for importing .graphql files in various build tools.", |
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
48795
744