Relation doesn't exist on Type



Hi, I have a schema that looks like:

type Class {
   id: ID!
   heroImage: File

type File {
  id: ID!
  public_id: String!

When I try to access the relation on my server (TypeScript GraphQL-Yoga) I get the following error:

Property 'heroImage' does not exist on type 'Class'.

The interface for class is missing all relations from my schema.

I’m trying to return an array of our latest classes.

How would I achieve something like the following?

    const myClass = await prisma.classes({
      id: "123"
     fragment ClassWithHeroImage on Class {
       heroImage {

    const hero = myClass.heroImage.public_id;


This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.