Defining a GraphQL schema
Usually, a system has multiple types of data. For example, a school management system has teachers, students, departments, and courses. A department has multiple courses, and a course has multiple students. A teacher can teach multiple courses, and a course can be taught by multiple teachers as well. In this section, we will discuss how to define a GraphQL schema with multiple types of data.
Scalar types
Scalar types are the primitive types in GraphQL. The following table lists the scalar types in GraphQL:
Scalar type |
Description |
.NET type |
|
Signed 32-bit integer |
|
|
Signed double-precision floating-point value specified in IEEE 754 |
|
|