Skip to content

Commit

Permalink
chore(docs): tweak scalar writing
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Jun 25, 2021
1 parent 1d31a76 commit d30ac3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Like GraphQL, [Prisma has the concept of scalar types](https://www.prisma.io/doc

However some of the Prisma scalars do not have a natural standard representation in GraphQL. For these cases Nexus Prisma generates code that references type names matching those scalar names in Prisma. Then, you are expected to define those custom scalar types in your GraphQL API. Nexus Prisma ships with pre-defined mappings in `nexus-prisma/scalars` you _can_ use for convenience. The mapping is as follows:

**Prisma Standard Scalar to GraphQL Custom Scalar Mapping**
**Prisma Standard-Scalar to GraphQL Custom-Scalar Mapping**

| Prisma | GraphQL | Nexus `t` Helper | GraphQL Scalar Implementation |
| ---------- | ---------- | ---------------- | ----------------------------------------------------------------- |
Expand All @@ -229,9 +229,9 @@ However some of the Prisma scalars do not have a natural standard representation

> **Note:** Not all Prisma scalar mappings are implemented yet: `BigInt`, `Decimal`, `Unsupported`
While you are not required to use the implementations supplied by Nexus Prisma, you _are required to define custom scalars whose name matches the above mapping_.
You can use your own GraphQL Scalar Implementation, however, you _must adhear to the above Prisma/GraphQL name mapping defined above_.

Here is an example using the Nexus Prisma pre-defined custom scalars:
Here is an example using Nexus Prisma's pre-defined GraphQL custom scalars:

```ts
import NexusPrismaScalars from 'nexus-prisma/scalars'
Expand Down

0 comments on commit d30ac3c

Please sign in to comment.