GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.
Let’s start with the initial configuration, first of all, we need to create our new project with the Nest CLI
The purpose of this article will be to show how to handle and validate the data for a rest endpoint with NestJS framework.
Suppose that we want to create an endpoint to add a product, and we want to validate that the product name is not empty, and is the required field. What is the way to do that with NestJS?