How Modern Banking Is Using GraphQL

How Modern Banking Is Using GraphQL

Posted in

GraphQL is an incredibly powerful query language that connects data in unique and powerful ways. One of the most interesting use cases for GraphQL is in the banking industry, where it provides incredible value and insight across different data sources and use cases. Below, we’ll look at GraphQL and some of its use cases in banking. Let’s dive in!

What is GraphQL?

Before discussing specific examples of GraphQL in banking, we should briefly refresh ourselves on what GraphQL is. GraphQL is a query language for APIs that allows clients to request exactly what they need in terms of data and how they need it. GraphQL was originally developed by Facebook in 2012 and was released as an open-source project in 2015. It has since been iterated with several forks and evolutions extending the core technology.

GraphQL has some huge benefits, including:

  • Highly flexible queries: GraphQL requests are formulated around the exact data needs of the client. Unlike traditional APIs, where data is set in a fixed set and format, GrapQL allows for a higher amount of user control, reducing over-fetching and under-fetching while improving operational fit.
  • Single endpoints: Since GraphQL allows for data to be served, shaped, and formatted by the user, a single endpoint can be used to serve the entirety of the data in a given structure. This can drastically simplify the use case at scale and make for much more efficient and streamlined flows.
  • Strong typing: GaphQL is strongly typed, with defined schemas controlling what can be queried and in what method. This allows for a strong contract between client and server, improving security, user experience, and data flows at scale.
  • Introspection: GraphQL allows clients to query the schema itself. This can allow for a deeper insight into the service and a better understanding of how to build around it.

4 Example Uses of GraphQL In Banking

With that quick refresher out of the way, let’s look at some of the example use cases of GraphQL in modern banking.

1. National Australia Bank

National Australia Bank (NAB) is one of the largest banks in Australia, operating thousands of locations across Australia, New Zealand, and Asia and servicing nine million global customers.

As a large and storied financial institution, NAB suffered from the same reality as most banking institutions — over time, its technical complexity had increased, and its monolithic codebase was growing unwieldy in the face of innovation. NAB identified four general problems that it needed to solve to effectively establish a market share:

  • Duplication issues: Build effort was being duplicated, introducing additional costs and headaches when distributing new features. Each new feature would need to be built for different platforms and channels.
  • Bottlenecks: Servicing multiple products became difficult despite significant development bottlenecks, making effective distribution all but impossible.
  • Inconsistent experience: Since they were building multiple products for multiple situations, the UI and accessibility of those products were highly inconsistent, leading to poor user and developer experience.
  • High-risk frontend deployments: Deploying frontends for each form and function on top of a monolith meant that the development environment was poorly situated for innovation, resulting in significant risk and difficulty of implementation.

To resolve these issues, NAB adopted a new strategy — a platform called NAB-X that simplified the interaction with their services through a microservices approach to frontends. To effectively implement this frontend experience to power their applications and interfaces in a variety of situations, NAB adopted GraphQL as their core topology, allowing a high level of flexibility.

The outcome was a highly effective system that allowed for stable backends to be interfaced with a complex network of interfaces. NAB notes GraphQL has a minimal learning curve and has already granted productivity and application performance advantages.

“Using GraphQL also results in a strongly typed and uniform mechanism for frontend code interacting with backends, which avoids disparate fragile client implementations. This aligns with our aim to deliver features to customers as quickly and safely as possible. More broadly, there are opportunities to explore around the design of a clean federated GraphQL service in the future.”

2. Varo

Varo is a modern bank in every sense of the word. Founded in 2017, Varo was launched with the specific goal of disrupting traditional banking with modern technology and approaches. Accordingly, from the start, there was a huge focus on how to best serve various users across different services, platforms, and devices. By 2021, Varo hosted 4 million accounts and was handling hundreds of millions of service requests a month.

To handle this massive amount of data, Varo needed to build a connected microservices implementation to meet the varied use cases. Varo adopted Apollo and GraphQL to meet this high throughput need. Sundar Siva, Senior Director of Engineering, explains:

“Before we launched Varo Bank, we had Varo Money, a payments app which utilized the standard API gateway in a monolithic approach. But given the number of microservices we needed to build Varo Bank, using a monolith would have set us back years. We didn’t have that kind of time. With Varo Bank, we had the opportunity to build a brand new tech stack from scratch. We knew we had to go with GraphQL and Apollo Federation. There’s no other viable solution for composable architectures at scale.”

Varo adopted the concept of the supergraph to make GraphQL its core technology. At its heart, the supergraph represents a unified view of a company and its data, services, frameworks, interchanges, and so forth. It is a graph of graphs, in other words, allowing for more rapid evolution and more flexible consumption. This ultimately results in a far more modular and extensible system than a monolith, powered by GraphQL to allow data and systems to live where they’re needed.

This approach allowed Varo to rapidly scale, ultimately servicing over 500 million monthly requests with a highly efficient system.

3. Goldman Sachs and Legend GraphQL

One of the most interesting facets of modern banking is the juxtaposition between classical user structures and the need to rapidly move and innovate. What was once a collection of names and amounts in a ledger book has become an interconnected and complex series of businesses, individuals, taxable entities, and more.

In order to provide modern financial services, systems that handle vast amounts of interconnected data have become as valuable as gold. Goldman Sachs, recognizing this value, has contributed a GraphQL-centric platform called Legend to the Fintech Open Source Foundation (FINOS), aiming to provide next-generation data modeling for fintech and banking.

Legend is built around making data easier to connect and transform. By implementing GraphQL resolvers, which connect data sources through federated systems, data can be surfaced and served across different instances, use cases, and interfaces. This establishes a sort of federated contract through the graph, allowing for information to be not only connected but navigated. Legend’s core offering hinges on providing high-quality and interconnected data.

This comes into effect when looking at the decisions that need to be made for banking. When a bank decides to lend money, for instance, it must consider the entity in question, its connections to business entities, the history of its lending, and other such data points. These data points are not always equal in weight or impact but are valuable and should be considered contextually. Legend seeks to make this process easier by serving the data in the context, form, and function needed by the decision-maker, making it easier to make effective decisions at scale.

4. Banco Bilbao Vizcaya Argentaria (BBVA), Deeptracy, and GraphQL

Another good example of GraphQL in action is the effort to rewrite Deeptracy as deployed by Banco Bilbao Vizcaya Argentaria, better known as BBVA. BBVA is a financial services organization, and its iterative tech arm, known as BBVA Innovation Labs, has been driving industry technology forward for quite a few years now.

One of their offerings, Deeptracy, is an open-source tool that helps identify security issues with third-party libraries. This is a critical security component in any tech stack, especially in fintech. While the original solution was very useful, project owner Roberto Martinez wanted to improve the codebase to make integrating the system easier and more efficient. To do this, Martinez would need to rewrite a lot of code and provide Deeptracy with enough flexibility to meet both current and future use cases.

Martinez adopted two solutions to help rewrite the codebase. The first was to adopt Hasura as an API management platform, allowing him to establish strong governance and management across a variety of use cases. The second was to adopt GraphQL, which would allow him to connect the underlying systems and functions in a way that could be iterated and expanded upon depending on the user case. Adopting GraphQL meant that only the underlying code needed to be developed, with the use cases developing and being served by the specific calls and interactions as defined by the user.

According to a case study published by Hasura, the platform helped reduce Roberto’s development time from two months to about three weeks. In the post, the benefits of this approach are made very clear:

“Thanks to the GraphQL API, his maintenance workload was much lesser: It will be much easier to iterate on, as they do not need to write new APIs to fetch specific data. Once BBVA integrates their other software with DeepTracy, their documentation and communication requirements will be significantly reduced.”

Final Thoughts

GraphQL is powering some of the most interesting use cases in the API space, and a good portion of these are in the banking and fintech industries. Organizations are finding that GraphQL provides greater control over data sources while providing a level of flexibility that is vital to proper data service and transformation.

Of course, GraphQL is not the only solution currently being deployed for these tasks. Notably, open banking has latched onto a variety of solutions, including standard RESTful implementations. That being said, GraphQL has proven useful for many use cases that prioritize efficiency and variable use patterns.

Are there other examples of banks and fintech using GraphQL? We’d love to hear about them! Let us know in the comments below!