When we started Productfy in 2018 our mission was to optimize for the developer experience. Building fintech applications is not like building a dog walking app. We needed something flexible, lightweight, and really fast to make sure our developers could build just about any fintech application from neobanking to card issuance use cases.
GraphQL was developed internally by Facebook before being open sourced in 2015. Now hosted by the non-profit Linux Foundation, GraphQL is gaining rapid acceptance and is used to build apps for small, medium, and enterprise businesses like GitHub, Pinterest, Shopify, and many others. The implications of it are powerful enough for us to make a bet for our developer toolkit. Here’s why:
LightweightThe challenge with building fintech using a traditional REST-based protocol in banking as a service is the hundreds of transactions, accounts, users, and card objects that a REST-based protocol would fetch in the JSON. As a developer, you cannot specify which fields or objects you want - you have to pull the entire JSON and parse the data on your end which not only increases the load but the response times. This is especially critical today on any mobile app to lighten the payload and optimize for responsiveness.
GraphQL is a query language for APIs that is ideally designed for mobile apps, providing quick response time while using minimum consumer bandwidth. Its application query language is specific to your application, not to the database that holds your data. That means it only asks for exactly what you need and nothing more. By simplifying the interactions between servers and clients, performance is greatly improved. Unlike REST APIs that can over- or underfetch data, GraphQL allows you to create queries that tell the server exactly how to respond with just the data they need in one unified request—no more and no less.
- Overfetching means the client is retrieving data that’s not needed when it’s being fetched, draining performance of the app and can also exhaust a user’s data plan.
- Underfetching is the opposite; not enough data is included in an API response. The client needs to make additional API requests to satisfy its data requirements, again dragging down performance.
This degree of API control works very well in financial applications, as overfetching can negatively impact security.
Developers building off REST APIs know there are common discrepancies in formats and schemas. GraphQL enforces a common schema. REST APIs can have one endpoint with one format and another endpoint with a slight variation. With GraphQL, an API can output a person, entity, or object with a consistent schema or structure and greatly reduce churn from inconsistent REST-based outputs.
Here are a few more compelling reasons we like GraphQL:
- The query language is easy to understand. Most developers take to it quickly.
- A GraphQL schema is the backbone of every GraphQL API, creating an unfailing contract specifying the capabilities of an API.
- Because GraphQL is growing in popularity, there’s a strong support community.
- Rapid development and deployment. It’s possible to completely redesign the UI of an app without touching the backend.
- Apps built with GraphQL can be quick, even on slow network connections.
- Frontend and backend developers can follow a common schema, eliminating frontend/backend API design conflicts.
While GraphQL is just one way to embed features into your FinTech app, it offers clear advantages when speed and security are vital. Offering a powerful, streamlined process to not only build an app—but deliver a memorable experience to the hands of its users.
Fundamentally, GraphQL works on one simple basis:
Only communicate what matters.
That’s a powerful idea.