Compose Relational Queries for non scalar types



If I have my prisma.datamodel file setup as so

type User {
  id: ID! @id
  email: String! @unique
  name: String
  provider: Provider @relation(name: "ProviderRelation", link: INLINE)

type Provider {
  id: ID! @id(strategy: NONE)
  accessToken: String!

How am I able to query the a user by the provider ID? I was hoping to use the following code: context.prisma.user({ provider: { id: "XYZ" }})

The problem being my UserWhereUniqueInput only generates for id and email

input UserWhereUniqueInput {
  id: ID
  email: String


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