Support for an Interface type
## Problem On large schemas you may want to ensure that a model conforms to a specific shape. This often allows for better compatibility across the system. The motivation for Interfaces in Prisma is similar to [GraphQL's motivation](https://graphql.org/learn/schema/#interfaces). ## Suggested solution So far we've been thinking about this purely at the Prisma-level. It's checked by our tooling, but does not live in the database at all. Something like: ```groovy interface Character { id Int @id name String friends Character[] } model Human implements Character { id Int @id name String friends Character[] totalCredits Int } model Droid implements Character { id Int @id name String friends Character[] primaryFunction String } ```
Posted by matthewmueller on May 18, 2020, 3:52 PM
Tags
Related issues
- some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
- I think of this as the kiosk economy.
- What a goofy comment.
- There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
- Compose support in WSLc
- [RFC] Roadmap to v2.0
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
support (Other)
some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
I think of this as the kiosk economy.
What a goofy comment.
There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
Compose support in WSLc
[RFC] Roadmap to v2.0
[Feature]: Add TurboQuant Support for KV Cache Quantization
Support for AGENTS.md and .agents/skills/, the community has been asking since August 2025
Support for an Interface type
## Problem On large schemas you may want to ensure that a model conforms to a specific shape. This often allows for better compatibility across the system. The motivation for Interfaces in Prisma is similar to [GraphQL's motivation](https://graphql.org/learn/schema/#interfaces). ## Suggested solution So far we've been thinking about this purely at the Prisma-level. It's checked by our tooling, but does not live in the database at all. Something like: ```groovy interface Character { id Int @id name String friends Character[] } model Human implements Character { id Int @id name String friends Character[] totalCredits Int } model Droid implements Character { id Int @id name String friends Character[] primaryFunction String } ```
Comments (0)
No comments yet. Start the discussion.