API with NestJS #30. Scalar types in GraphQL - With GraphQL, we model our API as a graph. Within a schema, we have various types of nodes that can relate to each other.
With GraphQL, we model our API as a graph. Within a schema, we have various types of nodes that can relate to each other. While the fields in our query might have sub-fields, at some point, we want to work on concrete data. We refer to the type that describes an individual value as the scalar. It does not have any sub-fields and represents a leaf in the graph. In some way, scalars are similar to primitive values.
A leaf in a graph is a node that does not have any children
GraphQL supports a set of scalar types out of the box:
Building Modern Nodejs Application using Nestjs and TypeScript - In this article, we will see how to build REST API using Nestjs with TypeScript. Building Modern Nodejs Application using Nestjs and TypeScript