can anyone tell me what the right formatting would...
# orm-help
b
can anyone tell me what the right formatting would be for a prisma type that references other objects? Below is an example of what I'm trying to do: datamodel.graphql:
Copy code
type Prey {
  id: ID! @id
  type: String!
  size: String!
  weight: Int
  owner: User! @relation(link: INLINE)
}

type Feed {
  id: ID! @id
  prey: Prey! @relation(link: INLINE)
  date: DateTime!
  notes: String
  snake: Snake!
}
Then I'm using yoga and prisma together and create the resolver like this but it isn't working atm:
Copy code
createFeed(
    prey: PreyWhereUniqueInput!
    date: DateTime
    notes: String
    snake: SnakeWhereUniqueInput!
  ): Feed!
I tried doing something like this from prisma playground:
Copy code
mutation createFeed{
  createFeed(
    prey: {id: "5c890827be07770007e6a914"}
    snake: {id: "5c86ed54be07770007e6a90e"}
    date: "2019-03-13"
  ){id date }
}
But that gives me
"Cannot return null for non-nullable field Mutation.createFeed."
isn't there some way to do a connect for the prey and snake id or something I just can't remember how to do it