Netflix's content engineering group Builds the tools used to stream content, while product engineering handles the actual streaming.
"Since we were building a new thing, we had a bit more freedom to experiment," Heinlen said. "GraphQL had a lot of traction in the industry...."
One important benefit of GraphQL is its ability to define a schema that models a business domain as a graph. Heinlen's team used a single-entity graph for several downstream integrations, including those using Java, Ruby, and REST. GraphQL's flexibility means it can connect with any back end, Heinlen said. "We define a GraphQL schema ... and then we build UIs around that," he said.
According to Taft, siloed downstream services historically have slowed down access to information, but moving to the graph model makes data accessible regardless of where it's stored.
Now the company is using GraphQL to create single-entity graphs for many "many dozen" other applications, Heinlen said. "We have a team inside the company building a multientity graph, which is a holistic view of all our content engineering entities and domains and operations we can do on them," Heinlen said. Also under construction is a UI to front this federated graph.
"Having this unified graph is going to allow us to answer questions from the product teams that we haven't been able to answer before because the information was in siloed systems," Heinlen said. "Now, all the data in your organization is accessible and available, and you just build against it."
GraphQL isn't a panacea he says schema management, Error Handling, and distributed writes have issues, but what won Heinlen over was how it changes how teams and organizations behave and communicate, he said.
"[GraphQL] starts teams talking to each other on how they can evolve the schema," Heinlen said. "It improves the way Front-end and Back-end engineers work together. And it acts as a living source of Documentation for your system."
He was concerned about using technology created by a single company, Facebook, but when the site spun off the effort into GraphQL Foundation with a community involvement he was more comfortable.
Heinlen still supports REST,
"It has gotten us a very long way and has a lot of good things about it," he said. But GraphQL goes further to help an organization's teams communicate more efficiently and combine multiple product schemas, he said.
"GraphQL promotes a new type of service, a higher-order service. It's like a giant map Function in the cloud, and countless clients can develop against it," he said.