WIP graphql-gateway
We're building a GraphQL Subscription server using Node.js that sends live data updates to subscribed clients. For example, if you wanted to know when a purchase order was created, when a delivery truck with your package was a mile away, or when a PT ticket was moved from "In Review" to "Done", you could subscribe to those events and get the information in real time.
With this ability, Wayfair can build super cool and useful applications. A team can put their sprint board up on a TV in their area and see the progress of the sprint as it happens, instead of needing to refresh the page to see what has changed. A busy Mom can make it home just in time for her Wayfair delivery because she is getting real-time GPS updates on her package from the Wayfair mobile website or app. One of Wayfair's biggest suppliers can send trucks with more products on it because they know when we request an order from them as soon as it happens.
Status
Through challenge day, were able to implement a single schema composed of the current UWAPI, SF, and a new subscription schemas. We decided to host the subscription schema component, as well as the gateway with the stitched schema as a node server, since PHP servers do not natively support daemon-like background processes, which we require to push out updates to subscribers.
Unfortunately, we were not able to complete the subscriptions implementation due to connection or configuration issues with Redis.
Next steps
We plan to continue debugging our Redis connection issues, as well as to look into other tools to support our PubSub php implementation.
Anyone with questions or who is interested in contributing can message the team on Slack in the #wawdtwsbd-gql-subs channel.
Running
After clone the project, run:
git fetch --all && git checkout final_submission
Install Babel-CLI tools and required packages via NPM:
npm install babel-cli
npm install
Export a valid auth token:
export AUTH_TOKEN="bearer eyJ0eXAiOiJK...hw
Valid auth-token can be retrieved by going to GraphiQL, selecting Integration Testing as the application and clicking show token. Copy the value and save it as AUTH_TOKEN.
Start the server:
babel-node app.js
Log in or sign up for Devpost to join the conversation.