Back to Wasp

Superjson Note

web/versioned_docs/version-0.21/data-model/operations/_superjson-note.md

0.23.0880 B
Original Source

import { ShowForTs } from '@site/src/components/TsJsHelpers';

:::info Payload constraints Wasp uses superjson under the hood. This means you're not limited to only sending and receiving JSON payloads.

Wasp will automatically handle the serialization and deserialization for all the data types that superjson supports (like biging, Date, Map, Set, etc.), and for Prisma.Decimal.

<ShowForTs> As long as you're annotating your Operations with the correct automatically generated types, TypeScript ensures your payloads are valid (i.e., Wasp knows how to serialize and deserialize them). </ShowForTs>

:::