Skip to content

Instantly share code, notes, and snippets.

@freiksenet
Last active August 31, 2017 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freiksenet/78eabc22860c9a3fb63d4b2d30776a65 to your computer and use it in GitHub Desktop.
Save freiksenet/78eabc22860c9a3fb63d4b2d30776a65 to your computer and use it in GitHub Desktop.
import {
makeRemoteExecutableSchema,
mergeSchemas,
} from 'graphql-tools';
import {
execute,
HttpLink,
makePromise,
} from 'apollo-link';
const schema1Link = new HttpLink({ uri: 'https://1jv3nzn99.lp.gql.zone/graphql' });
const schema1 = makeRemoteExecutableSchema(({ operation }) => makePromise(execute(schema1Link, operation)));
const schema2Link = new HttpLink({ uri: 'https://kwkzzz7w7.lp.gql.zone/graphql' });
const schema2 = makeRemoteExecutableSchema(({ operation }) => makePromise(execute(schema2Link, operation)));
const schema = mergeSchemas({ schemas: [schema1, schema2]});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment