Skip to content

Instantly share code, notes, and snippets.

@gc-codesnippets
Created May 10, 2018 15:11
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 gc-codesnippets/a909236ad8867aa5433a1169d71a7fb4 to your computer and use it in GitHub Desktop.
Save gc-codesnippets/a909236ad8867aa5433a1169d71a7fb4 to your computer and use it in GitHub Desktop.
const postServiceBinding = new RemoteBinding({
typeDefsPath: '../schemas/post-service.graphql',
endpoint: 'https://post-service-nyvvyjtbyt.now.sh',
})
const userServiceBinding = new RemoteBinding({
typeDefsPath: '../schemas/user-service.graphql',
endpoint: 'https://user-service-lvzqpqmeqb.now.sh/',
})
const server = new GraphQLServer({
typeDefs: './src/schema.graphql',
resolvers,
context: req => ({
...req,
userService: userServiceBinding,
postService: postServiceBinding,
}),
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment