Example of how to use fanout-graphql-tools with apollo-server-express and express.
-
Configure your
/etc/pushpin/routes
file to contain:*,debug localhost:57410,over_http
-
In this directory,
npm install npm start
This will run the example GraphQL Server, listening on port 57410
-
Access the example in your web browser through pushpin using http://localhost:7999/graphql
-
Using the GraphiQL Playground UI that should render here, create the following subscription:
subscription { postAdded { author, comment, } }
-
Open another tab in the GraphiQL Playground, and send the following mutation:
mutation { addPost(comment:"hi", author:"you") { author, comment, } }
-
Switch back to the GraphiQL Playground tab for the subscription, and on the right side you should see the result of your mutation.