craft3 – 3.x GraphQL mutation to create a pre-existing Entry returns the most current Entry instead? Want to get the id of the created/existing entry

In Craft 3 I have a GraphQL mutation set up successfully — it creates the Entry.

Curiously, if that Entry already exists (there is another Entry with identical data) then the return uses data from the most recent Entry regardless of section, etc. If Craft just made that Entry because of my mutation then that’s great, but if it didn’t the most recent Entry may not be the one I want.

In PHP I have this:

$mutation = << 1,
    "eventName" => $eventName,
    "eventId" => $eventId,
  ];

I’d like to get back the Craft ID of the created (or pre-existing) Entry.

It feels like it can’t be right that I have to run a mutation and then a separate query to get the Craft ID of the Entry back.

I searched and found How can I have created data (id) returned for a GraphQL mutation? but it did not get me to a solution.

Any tips to share? Thanks!

Read more here: Source link