The API references a number of custom GraphQL Scalar Types. If you're using code generators to transform GraphQL types coming from the Content Delivery API to TypeScript, here's the list of mappings you need to specify:
BooleanType: booleanCustomData: Record<string, string>Date: stringDateTime: stringFloatType: numberIntType: numberItemId: stringJsonField: unknownMetaTagAttributes: Record<string, string>UploadId: string
Generating TypeScript types from GraphQL queries improves code security, consistency, and robustness by avoiding manual type definitions. This tutorial explains how to set up graphql-codegen to automatically generate TypeScript types for a Next.js project using DatoCMS.