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

@graphql-tools/github-loader

Package Overview
Dependencies
Maintainers
3
Versions
1159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/github-loader - npm Package Compare versions

Comparing version 7.3.28-alpha-20230407131203-6663dff6 to 7.3.28-alpha-20230407140332-1a85b75e

9

cjs/index.js

@@ -106,9 +106,12 @@ "use strict";

prepareRequest({ owner, ref, path, name, options, }) {
var _a, _b;
const token = options.token || ((_b = (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b['GITHUB_TOKEN']);
if (!token) {
throw new Error('You must provide a token to use the GitHub loader');
}
const headers = {
'content-type': 'application/json; charset=utf-8',
'user-agent': 'graphql-tools',
authorization: `bearer ${token}`,
};
if (options.token) {
headers['authorization'] = `bearer ${options.token}`;
}
return {

@@ -115,0 +118,0 @@ method: 'POST',

@@ -102,9 +102,12 @@ import { parseGraphQLSDL, parseGraphQLJSON } from '@graphql-tools/utils';

prepareRequest({ owner, ref, path, name, options, }) {
var _a, _b;
const token = options.token || ((_b = (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.env) === null || _b === void 0 ? void 0 : _b['GITHUB_TOKEN']);
if (!token) {
throw new Error('You must provide a token to use the GitHub loader');
}
const headers = {
'content-type': 'application/json; charset=utf-8',
'user-agent': 'graphql-tools',
authorization: `bearer ${token}`,
};
if (options.token) {
headers['authorization'] = `bearer ${options.token}`;
}
return {

@@ -111,0 +114,0 @@ method: 'POST',

{
"name": "@graphql-tools/github-loader",
"version": "7.3.28-alpha-20230407131203-6663dff6",
"version": "7.3.28-alpha-20230407140332-1a85b75e",
"description": "A set of utils for faster development of GraphQL tools",

@@ -5,0 +5,0 @@ "sideEffects": false,

@@ -10,2 +10,4 @@ import { Loader, BaseLoaderOptions, Source } from '@graphql-tools/utils';

* A GitHub access token
*
* @default process.env.GITHUB_TOKEN
*/

@@ -12,0 +14,0 @@ token?: string;

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