Graphql Playground and console.log mismatch


#1

Hey there. I’m looking for some help on a weird issue that I’m running into. I have a prisma datamodel with with two types like such:

type User {
    id: UUID! @unique
    someField: TypeTwo @relation(name: "RelationName", onDelete: CASCADE)
}

type TypeTwo {
    id: UUID! @unique
    user: User! @relation(name: "RelationName")
}

My schema.graphql is:

type User {
    id: UUID!
    someField: TypeTwo
}

type TypeTwo {
    id: UUID!
    user: User!
}

I have a query to get user information inside my Query resolvers:

me: (parent, args, context) => {
    return context.prisma.user({ id: args.id })
}

The weird thing is when I run the query on the graphql playground it returns the someField value for User, but when I console.log the query on my express server, it shows every field for User except for someField. Data is being saved correctly inside my db (Postgres). The playgrounds for my server and client are consistent. I have another relation field on User as well, and I have the same issue. Does anyone know why this would be? I can provide more information if helpful. I’m using prisma 1.34.1 and graphql-yoga 1.17.0.