Back to Prisma1

Prisma Vs Code Extension Fq14

docs/1.34/faq/prisma-vs-code-extension-fq14.mdx

1.34.121.0 KB
Original Source

export const meta = { title: 'How to get syntax highlighting in VS Code?', position: 13, articleGroup: 'Prisma 1 VS Code extension', }

FAQ

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 .graphql.

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.prisma to datamodel.graphql) and install the GraphQL VS Code extension.