#Argument "columnName" is missing (v5.21.1)

2 messages · Page 1 of 1 (latest)

west lake
#

Attempting to run a create query with an unchecked input, but getting a "argument is missing" error. This is the query:

return await transactionClient.tableName.create({
  data: {
    createdById: 28506,
    editedById: 28506,
    statusId: 1,
    companyProductId: 74,
    runPeriodType: "meta",
    audienceType: "meta",
    destinationType: null,
    audienceLocationType: "zipcode",
    metaAdSetId: "---",
    name: "---",
    channelMetaCampaignId: 23,
+   channelMetaCampaign: {
+     create: CampaignChannelMetaCampaignCreateWithoutAdSetsInput | CampaignChannelMetaCampaignUncheckedCreateWithoutAdSetsInput,
+     connectOrCreate: CampaignChannelMetaCampaignCreateOrConnectWithoutAdSetsInput,
+     connect: CampaignChannelMetaCampaignWhereUniqueInput
+   }
  },

So channelMetaCampaignId is defined, yet it is complaining that I should define the checked variant. TypeScript doesn't complain about this, only runtime

solar beaconBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution