<p>As noted by yvanavermaet in the comments on the question, this is an issue with Craft. It's been fixed in 3.6.5.</p>
<p>Thanks!</p>

CC BY-SA 4.0
2021-02-19T20:36:22.397Z
2021-02-19T20:36:22.397Z
David Oliver
<p>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 <code>id</code>.</p>
<pre><code>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
    }
  }
}
</code></pre>
<p>Data returned:</p>
<pre><code>{
  &quot;data&quot;: {
    &quot;save_pdWindowCleaningRequests_pdWindowCleaningRequests_Entry&quot;: null
  }
}
</code></pre>
<p>Mutation result screenshot:</p>
<p><a href="https://i.sstatic.net/ZYC1G.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZYC1G.png" alt="enter image description here" /></a></p>
<p>Subsequent entry query result screenshot, showing entry was created:</p>
<p><a href="https://i.sstatic.net/zbRnh.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zbRnh.png" alt="enter image description here" /></a></p>
<p>I'm running Craft 3.5.15.1 with PostgreSQL 12.4 in Ubuntu 18.04.5 LTS.</p>

CC BY-SA 4.0
2021-01-29T13:31:41.973Z
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.
yvanavermaet
CC BY-SA 4.0
2021-01-29T14:06:11.390Z
For your reference, we have created a ticket on their GitHub: https://github.com/craftcms/cms/issues/7468
yvanavermaet
CC BY-SA 4.0
2021-02-08T10:25:00.787Z
It will be fixed in the next Craft 3.6 release (unsure when or which version that will be though)
yvanavermaet
<graphql>
How can I have created data (id) returned for a GraphQL mutation?
# How can I have created data (id) returned for a GraphQL mutation?

(Asked by: username_0 on 2020-11-10)

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:

Subsequent entry query result screenshot, showing entry was created:

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

**Tags:** graphql

> **Comments:**
> **username_1**: 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.  
> **username_1**: For your reference, we have created a ticket on their GitHub: https://github.com/craftcms/cms/issues/7468  
> **username_1**: It will be fixed in the next Craft 3.6 release (unsure when or which version that will be though)  

---

## 1 answers

### Answer by username_0 on 2021-02-19. Score: 1 | Accepted answer

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

Thanks!


---

