1

I have a mutation which is successfully creating an entry, but the data returned for the mutation does not include the fields I specify, such as id.

mutation saveWindowCleaningRequest($title: String!, $frontendInput: String!) {
  save_pdWindowCleaningRequests_pdWindowCleaningRequests_Entry(title: $title, siteId: 2, frontendInput: $frontendInput, authorId: 1) {
    id
    title
    ... on pdWindowCleaningRequests_pdWindowCleaningRequests_Entry {
      frontendInput
    }
  }
}

Data returned:

{
  "data": {
    "save_pdWindowCleaningRequests_pdWindowCleaningRequests_Entry": null
  }
}

Mutation result screenshot:

enter image description here

Subsequent entry query result screenshot, showing entry was created:

enter image description here

I'm running Craft 3.5.15.1 with PostgreSQL 12.4 in Ubuntu 18.04.5 LTS.

3
  • Did you find a fix for this or logged a bug ticket on their GitHub? Currently running into the same issue. If you don't specify the siteId or use 1 it will return the fields. So must be a bug with the implementation. Jan 29 at 13:31
  • 1
    For your reference, we have created a ticket on their GitHub: github.com/craftcms/cms/issues/7468 Jan 29 at 14:06
  • 1
    It will be fixed in the next Craft 3.6 release (unsure when or which version that will be though) Feb 8 at 10:25
1

As noted by yvanavermaet in the comments on the question, this is an issue with Craft. It's been fixed in 3.6.5.

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.