Created
May 10, 2018 15:11
-
-
Save gc-codesnippets/a909236ad8867aa5433a1169d71a7fb4 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
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