Last active
August 31, 2017 12:16
-
-
Save freiksenet/78eabc22860c9a3fb63d4b2d30776a65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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