Automatically validate arguments in GraphQL

In my last post on Exposing Validation Metadata in GraphQL I showed how we can expose validation metadata from the server to the client in order to have to only define our validation rules once. In this post I’ll show how to autoamically enforce those validation rules on the server.

Exposing Validation Metadata in GraphQL

When we do input validation in our applications we want them on both the client and server for a couple of key reasons:

A better approach to GraphQL renames

As it typically happens I write a post on how I do something, it gets some decent traffic and then I find a better way to do it.

Be careful of lazy dependencies

What are lazy dependencies?

Handling name collisions in GraphQL schema stitching

GraphQL Schema Stitching is the mechanism of composing multiple GraphQL schemas together into a single unified schema. This plays strongly into the concept of “back-ends for front-ends” which is building a specialised API designed specifically for the app in question. This “API Gateway” takes the schemas of the micro-services needed for it’s functionality, combines, extends and exposes them to the front end.