# Custom Scalar Types

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:

```plaintext
BooleanType: boolean
CustomData: Record<string, string>
Date: string
DateTime: string
FloatType: number
IntType: number
ItemId: string
JsonField: unknown
MetaTagAttributes: Record<string, string>
UploadId: string
```

> [!PROTIP] Pro tip: How To Generate TypeScript Types From GraphQL
> Generating TypeScript types from GraphQL queries improves code security, consistency, and robustness by avoiding manual type definitions. [This tutorial](https://www.datocms.com/blog/how-to-generate-typescript-types-from-graphql.md) explains how to set up graphql-codegen to automatically generate TypeScript types for a Next.js project using DatoCMS.

## Related content in "Content Delivery API"

- [Content Delivery API Overview](https://www.datocms.com/docs/content-delivery-api.md)

- [Your first request](https://www.datocms.com/docs/content-delivery-api/your-first-request.md)
- [How to fetch records](https://www.datocms.com/docs/content-delivery-api/how-to-fetch-records.md)

- [API headers (environments, drafts, strict mode, cache tags, content link)](https://www.datocms.com/docs/content-delivery-api/api-endpoints.md)
- [Authentication and permissions](https://www.datocms.com/docs/content-delivery-api/authentication.md)

- [Error codes & handling failures (CDA)](https://www.datocms.com/docs/content-delivery-api/errors.md)
- [Technical Limits (CDA)](https://www.datocms.com/docs/content-delivery-api/technical-limits.md)

- [Complexity](https://www.datocms.com/docs/content-delivery-api/complexity.md)
- [Custom Scalar Types](https://www.datocms.com/docs/content-delivery-api/custom-scalar-types.md)

- [Pagination](https://www.datocms.com/docs/content-delivery-api/pagination.md)
- [Filtering records](https://www.datocms.com/docs/content-delivery-api/filtering-records.md)

- [Deep Filtering](https://www.datocms.com/docs/content-delivery-api/deep-filtering.md)
- [Ordering records](https://www.datocms.com/docs/content-delivery-api/ordering-records.md)

- [Localization](https://www.datocms.com/docs/content-delivery-api/localization.md)
- [Direct vs. Inverse relationships](https://www.datocms.com/docs/content-delivery-api/inverse-relationships.md)

- [Modular content fields](https://www.datocms.com/docs/content-delivery-api/modular-content-fields.md)
- [Structured text fields](https://www.datocms.com/docs/content-delivery-api/structured-text-fields.md)

- [Hierarchical sorting (Tree-like collections)](https://www.datocms.com/docs/content-delivery-api/hierarchical-sorting.md)
- [Images and videos](https://www.datocms.com/docs/content-delivery-api/images-and-videos.md)

- [Filtering uploads](https://www.datocms.com/docs/content-delivery-api/filtering-uploads.md)
- [SEO and favicon](https://www.datocms.com/docs/content-delivery-api/seo-and-favicon.md)

- [Meta fields](https://www.datocms.com/docs/content-delivery-api/meta-fields.md)
- [Cache Tags](https://www.datocms.com/docs/content-delivery-api/cache-tags.md)

- [Changelog](https://www.datocms.com/docs/content-delivery-api/changelog.md)