June 3, 2020

GraphQL: cloud to autonomous yard truck connectivity

Kyle Hayes

Outrider is creating and using cutting-edge technology to automate distribution yards. We’re not only focused on automating the yard truck but all the manual, repetitive tasks in the yard. This involves a 3-part integrated system — autonomous vehicles, site infrastructure, and cloud-based management software.

I work on the Connectivity team, which is responsible for the management software. Known as Mission Control, customers can centrally manage multiple yard trucks simultaneously and get rich insights into their freight and yard operations. This means the communication between yard trucks and the cloud requires a fast and flexible server-side API. GraphQL is an ideal candidate for enabling web and cloud workflows for our teams but also for our customers who want real-time integration with their warehouse management systems (WMS).

We’re encouraging the use of our GraphQL API. These integrations enable a live and holistic view into yard operations, in which historically data has been stale and siloed.

Web APIs are constantly evolving

Getting dynamic data from the server to the browser has changed drastically in the past several years. It is humbling to consider the various methods and implementations that have been developed to accomplish different data needs. These days, users demand more responsive, fast-loading, and rich web applications. REST APIs have served the industry well over time—especially when compared to SOAP—but they can be challenging to evolve in an agile manner as data demands change. One client may want a lot more data than another client. A mobile client may want less data from many different sources in one response. There is typically an inordinate amount of time spent on discussing what HTTP status code to use or what HTTP method is most appropriate. REST APIs can also be difficult to keep in sync with a specification you’ve written—assuming you’ve actually written one! All of this gets a lot better when you implement a GraphQL API.

The need for GraphQL

GraphQL is a modern query language for today and the future. The intuitive and elegant syntax is ingenious in that the shape of your response will look just like your request. In addition, GraphQL is solely a language specification—it doesn’t care whether you are communicating over HTTP, sockets, protocol buffers, or carrier pigeon (okay, that last one is a bit of a stretch). In comparison to REST over HTTP, it simplifies the communication by exclusively using POST, and other metadata is simply provided in the envelope of the response. No more parsing esoteric HTTP headers or reading through pages of a specification on proper paging only to learn the REST library you are using completely ignores it.

One of GraphQL’s greatest strengths is providing instinctive semantics for specifying only the data you want—even if it is nested within the object model. This is great for the client that needs a lot of attributes. Easily strip down the number of unnecessary attributes for the lightweight mobile client. GraphQL’s strictly typed nature and schema requirements ensure that clients interacting with the API know exactly what they can expect when sending queries and receiving responses. This greatly reduces the number of runtime errors that can occur in production.

GraphQL also introduces a model that allows the same query interface to be used for event publishing and subscribing interactions. This furthers the mission of enabling web applications to provide a rich and dynamic user experience as data is changing faster than ever and users want to be up to speed by the millisecond.

GraphQL at Outrider

More and more GraphQL usage is showing up in applications everywhere as developers recognize the benefits over developing REST and other HTTP-based APIs. However, due to its relative young age, it lacks a broad range of support across toolkits and libraries. This makes it harder to adapt legacy applications or clients to this new way of communicating. At Outrider, we’re modernizing a critical step in the supply chain and at the same time modernizing communication channels by encouraging the use of our GraphQL API. These integrations enable a live and holistic view into yard operations, in which historically data has been stale and siloed.


Customers who leverage our GraphQL API will get a tailored query and integration experience with their WMS. They will quickly realize the benefits of a modern and dynamic query language that even has support for real-time messaging with GraphQL subscriptions. By supporting this type of API, it also allows our team to be more agile and turn around features and new types of data more quickly.

At Outrider, we are building a powerful product that enables our customers to have a real-time view into their autonomous yard truck fleet. Thanks to GraphQL Subscriptions and Secure WebSockets, we can stream live telemetry from the yard trucks to the end user’s browser or mobile device. This enables them to see the trucks moving across the map in their distribution yard as it is happening. This information stream also provides pertinent visibility into their operational needs, such as the health and hardware status of the truck.

Looking towards the future

GraphQL is proving to be a highly valuable technology for our Connectivity team. We will increase the use of GraphQL as we build more integrations with internal and external systems. Given the agility and increasing robustness of this API, we will be able to add value-added features to the Outrider System.

As we find more sets of data to make available through GraphQL, we will find it advantageous to start orchestrating our GraphQL APIs. This will allow us to split out services into multiple modules rather than having everything be funneled through a single code base. This can be achieved with technologies like Apollo Federation which allow for this type of architecture to exist with much of the same intuitive and elegant integration we have come to appreciate with GraphQL.

At Outrider, we need to support the integration of multiple types of applications over the internet in an agile and dynamic manner. Fulfilling different data requirements for different data clients. GraphQL’s clean syntax, straightforward implementation, and agile approach to server-side data querying make it a modern and future-resistant choice for Outrider.

Kyle Hayes

Kyle is insatiably curious about the world around him. Technology and innovation have always been on the forefront of this curiosity. For as long as he can remember, he has been taking things apart to see how they function, building software programs, and bringing joy to others with his ideas. For the past fifteen years, Kyle has been working professionally building and architecting commercial and internal web-based experiences. After his 12-year tenure with Disney, he decided it was time to use his experience in disrupting the supply chain with autonomous operations at Outrider.

You might also like

May 15, 2024

Less-than-perfect robots deliver huge amounts of value

Science fiction has taught us to expect “perfect” robots – robots that can ... READ MORE

February 22, 2024

It’s 2024, and we are shipping our commercial system later this year

Later this year, the world’s largest F500 companies will begin autonomously and driverlessly ... READ MORE

November 14, 2023

Navigating challenges and seizing opportunities as a female engineer

A career in the tech industry has always been in the cards for ... READ MORE