<@U72QG90JZ> it looks like you left out a required...
# prisma-whats-new
d
@chandlervdw it looks like you left out a required field. A
campaign
field is mentioned in the error message.
c
@davidepalazzo This doesn’t make sense to me. I’m definitely sending the campaign, as the first request is going through. Here’s my mutation:
Copy code
const createDonationMutation = gql`
  mutation($amount: Int!, $campaign: ID!, $paymentInfo: Json!, $email: String) {
    createDonation(
      amount: $amount
      campaignId: $campaign
      paymentInfo: $paymentInfo
      email: $email
    ) {
      id
      isPaid
    }
  }
`;
and here’s the invocation
Copy code
createDonation({
      email: token.email,
      campaign: id,
      paymentInfo: token,
      amount: this.state.amount
    });
I’m pausing in the debugger and I definitely have that data going in…
@nilan ☝️ help?
figured it out — I had a one-to-one between
Donation
and
Campaign
and it should’ve been many-to-one
👍 1