@graphql-toolkit/url-loader
Advanced tools
Comparing version 0.6.8-alpha-0aec269.1 to 0.6.8-alpha-23bbb51.1
@@ -6,2 +6,3 @@ "use strict"; | ||
const valid_url_1 = require("valid-url"); | ||
const cross_fetch_1 = require("cross-fetch"); | ||
class UrlLoader { | ||
@@ -16,3 +17,3 @@ loaderId() { | ||
let headers = {}; | ||
let fetch; | ||
let fetch = cross_fetch_1.fetch; | ||
if (options) { | ||
@@ -29,5 +30,2 @@ if (Array.isArray(options.headers)) { | ||
} | ||
if (!fetch) { | ||
fetch = (await Promise.resolve().then(() => require('cross-fetch'))).fetch; | ||
} | ||
let extraHeaders = { | ||
@@ -34,0 +32,0 @@ Accept: 'application/json', |
import { introspectionQuery, buildClientSchema, parse } from 'graphql'; | ||
import { printSchemaWithDirectives } from '@graphql-toolkit/common'; | ||
import { isUri } from 'valid-url'; | ||
import { fetch as crossFetch } from 'cross-fetch'; | ||
export class UrlLoader { | ||
@@ -13,3 +14,3 @@ loaderId() { | ||
let headers = {}; | ||
let fetch; | ||
let fetch = crossFetch; | ||
if (options) { | ||
@@ -26,5 +27,2 @@ if (Array.isArray(options.headers)) { | ||
} | ||
if (!fetch) { | ||
fetch = (await import('cross-fetch')).fetch; | ||
} | ||
let extraHeaders = { | ||
@@ -31,0 +29,0 @@ Accept: 'application/json', |
{ | ||
"name": "@graphql-toolkit/url-loader", | ||
"version": "0.6.8-alpha-0aec269.1+0aec269", | ||
"version": "0.6.8-alpha-23bbb51.1+23bbb51", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -29,7 +29,8 @@ "repository": "git@github.com:dotansimha/graphql-toolkit.git", | ||
"ts-jest": "24.1.0", | ||
"typescript": "3.7.2" | ||
"typescript": "3.6.4" | ||
}, | ||
"dependencies": { | ||
"@graphql-toolkit/common": "0.6.8-alpha-0aec269.1+0aec269", | ||
"@graphql-toolkit/common": "0.6.8-alpha-23bbb51.1+23bbb51", | ||
"cross-fetch": "3.0.4", | ||
"tslib": "1.10.0", | ||
"valid-url": "1.0.9" | ||
@@ -40,3 +41,3 @@ }, | ||
}, | ||
"gitHead": "0aec269a77e1dd82cfaa778f92766ec79f019717" | ||
"gitHead": "23bbb512598c95e67ba4476ca410e7049655db02" | ||
} |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the 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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
3
13087
5
154
+ Addedtslib@1.10.0
+ Addedtslib@1.10.0(transitive)
Updated@graphql-toolkit/common@0.6.8-alpha-23bbb51.1+23bbb51