Skip to content

A GraphQL-based Schema Architecture for Microservices

Photo of Luca Mattia Ferrari
Hosted By
Luca Mattia F.
A GraphQL-based Schema Architecture for Microservices

Details

Message and Event payload validation has been a rather thorny problem to deal with for the past 20+ years. Several generations of Schema definition languages such as DTD, XML-schema, json-schema, OpenAPI have tried to solve that problem but their structure remains unfamiliar to most developers and often result in a rather anemic set of validation rules (such as every field is optional), leading to a perceived low value, and therefore a lack of interest.
Regardless of the schema language, there are three key problems that one must solve in a schema architecture:
- the re-usability of data structure definitions
- the expressiveness of the schema language
- the developer experience

Nav is a Small Business Lending platform built on a polyglot microservice architecture, complemented by an event bus. It is essential for us to develop a consistent way to validate our message payloads (APIs and events) across all microservices.
Considering that it has one of the best DevX in the industry, we got the idea to use GraphQL as a schema language (without any runtime component). After all, a GraphQL query describes the payload requested by a client, so why not use the same syntax to create a message definition and generate client-side and server-side validation code?

Presenter's Bio: Jean-Jacques ("JJ") has been building Service-Oriented Architectures and API platforms for the last 20+ years. He is a former member of the research staff at HRL and earned his Ph.D. from the University of Provence (Luminy campus), home of the Prolog language. He is the author of the SAM Pattern and inventor of the BOLT methodology.

Photo of GraphQL Barcelona group
GraphQL Barcelona
See more events
Online event
This event has passed