How to get syntax highlighting in VS Code?
In Prisma 1, the datamodel is written in GraphQL syntax (SDL). However, the datamodel files typically use the
.prisma file extension (e.g.
datamodel.prisma) instead of
In the new Prisma 2.0 version, Prisma introduces a custom data modeling syntax that is not compatible with Prisma 1's GraphQL syntax any more. The files written in the new Prisma 2.0 syntax must use the
.prisma file extension. The Prisma VS Code extensions is only compatible with the new Prisma 2.0 syntax.
If you want to get syntax highlighting for your Prisma 1 datamodel file, you need therefore need to rename it to use the
.graphql file extension (e.g. from
datamodel.graphql) and install the GraphQL VS Code extension.