What are Input Types?
Input types in GraphQL determine the overall structure of the data that can be provided in the queries, or mutations arguments, and represent the overall structure of the data in any GraphQL operation.
Input Types in GraphQL Schema
GraphQL is an open-source Query Language for APIs that allows us to query only the data we require, unlike the REST framework which returns the entire data as is configured in its API. With GraphQL, we can maintain a Schema that defines what data we can query from the server, and we can define a proper contractual schema like this between the client and the server. In this article, we will learn about the Union Types in GraphQL Schema, and implement our resolver for it in Node.JS.