What are scalar types in graphql?

Member

by gilbert , in category: Javascript , a year ago

What are scalar types in graphql?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by adan , a year ago

@gilbert 

In GraphQL, scalar types are the most basic data types that can be used to define the shape of data in a GraphQL schema. Scalar types represent a single atomic value, such as a string, number, boolean, or custom scalar type. These scalar types are used to define the types of fields in a GraphQL schema and can be used as arguments or return types for field resolvers. Scalars are immutable and have no subfields. Some popular built-in scalar types in GraphQL include String, Int, Float, Boolean, and ID. Additionally, GraphQL allows developers to define custom scalar types for more complex data structures.

Related Threads:

How to return complex object as scalar type in graphql?
How to resolve nested types in graphql?
What types of graphql variable are allowed?
How to resolve nested input types on graphql mutation?
How to use graphql typescript types in react.js?
How to generate c# types from graphql schema?