Advanced GraphQL #SDL #schema #types #scalars

GraphQL Schema Vocabulary

5 exercises — master GraphQL schema vocabulary: SDL, type system, non-null and list modifiers, built-in and custom scalars, enums, input types, and the three root operation types.

0 / 5 completed
GraphQL schema vocabulary quick reference
  • SDL — Schema Definition Language; the text format for defining a GraphQL API contract
  • ! (non-null) — guarantees the field will never return null
  • Query — read-only, safe to cache; Mutation — writes data; Subscription — real-time push
  • Scalar — leaf type with no sub-fields: Int, Float, String, Boolean, ID
  • Custom scalar — domain-specific scalar (DateTime, Email, URL) with custom validation
  • Enum — scalar restricted to a named set of values; prevents invalid string values
  • Input type — argument object for mutations/queries; cannot be used as a return type
1 / 5

What is the Schema Definition Language (SDL), and what role does it play in a GraphQL API?