Skip to content

Instantly share code, notes, and snippets.

@aswinmprabhu
Last active August 17, 2018 12:34
import {
makeRemoteExecutableSchema,
introspectSchema,
} from 'graphql-tools';
import fetch from 'node-fetch';
import { HttpLink } from 'apollo-link-http';
// To satisfy Extend peer dependencies
import 'apollo-link';
const createRemoteExecutableSchema = async () => {
// Create remote executable user schema
const userLink = new HttpLink({
uri: 'https://bazookaand.herokuapp.com/v1alpha1/graphql',
fetch,
});
const userSchema = makeRemoteExecutableSchema({
schema: await introspectSchema(userLink),
link: userLink,
});
return userSchema;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment