when I want to do a mutation, in which I want to a...
# random
q
when I want to do a mutation, in which I want to add relations with existing entities, should this work?
Copy code
mutation createBookingForAgent($agent: BookingForAgentagentAgent!,
  	$booking: BookingForAgentbookingBooking!) {
  createBookingForAgent(
    agent: $agent
    booking: $booking
  ) {
    id
  }
}
I can't make this work properly: I pass the ID of the agent and booking (which is enough to know which agent/booking it is, it are one-to-one relations):
Copy code
GraphQL error: Variable '$booking' expected value of type 'BookingForAgentbookingBooking!' but got: "cje8yzetf94i301976ne1mx3y". Reason: Expected 'BookingForAgentbookingBooking', found not an object. (line 1, column 123):
mutation createBookingForAgent($agent: BookingForAgentagentAgent!, $agentPaymentStatuses: String, $agentStatuses: String, $booking: BookingForAgentbookingBooking!)