You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@draftbit/auth-schema-link

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@draftbit/auth-schema-link - npm Package Compare versions

Comparing version

to
1.1.0

12

index.js
const fetch = require("node-fetch");
const { HttpLink } = require("apollo-link-http");
const { makeRemoteExecutableSchema, introspectSchema } = require("graphql-tools");
const { setContext } = require("apollo-link-context");
async function getAuthSchema() {
const link = new HttpLink({
async function getAuthSchema({ baseId, apiKey }) {
const http = new HttpLink({
uri: "https://auth.draftbit.com",

@@ -11,2 +12,9 @@ fetch

const link = setContext((request, previousContext) => ({
headers: {
"draftbit-base-id": baseId,
"draftbit-api-key": apiKey
}
})).concat(http);
const remoteSchema = await introspectSchema(link);

@@ -13,0 +21,0 @@ const remoteAuthSchema = makeRemoteExecutableSchema({

3

package.json
{
"name": "@draftbit/auth-schema-link",
"version": "1.0.0",
"version": "1.1.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"apollo-link-context": "^1.0.19",
"apollo-link-http": "^1.5.15",

@@ -8,0 +9,0 @@ "graphql-tools": "^4.0.5",

Sorry, the diff of this file is not supported yet