<p>For anything else than base element fields, you'll need to use an <a href="https://graphql.org/learn/queries/#inline-fragments" rel="nofollow noreferrer">inline fragment</a> to fetch your custom fields like so:</p>

<pre><code>query test {
  entries(section: "vacancies", limit: 20) {
    title
    expiryDate
    ...on sectionHandle_entryTypeHandle_Entry {
      description
    }
  }
}
</code></pre>

<p>Replace <code>sectionHandle</code> and <code>entryTypeHandle</code> with your values, I guess something like <code>vacancies_vacancies_Entry</code></p>

CC BY-SA 4.0
2020-02-26T12:30:46.570Z
2020-02-26T12:30:46.570Z
Oli
<p>This is definitely a noob question, but I can't seem to find an answer to this. (Completely new to GraphQL).</p>

<p>I'm trying to simply return entries:</p>

<pre><code>query test {
  entries(section: "vacancies", limit: 20) {
    title
    expiryDate
    description
  }
}
</code></pre>

<p>Since the description is a custom field, this gives an error. How do I get a custom field value?</p>

<craft3><graphql>
How to return custom fields in GraphQL
# How to return custom fields in GraphQL

(Asked by: username_0 on 2020-02-26)

This is definitely a noob question, but I can't seem to find an answer to this. (Completely new to GraphQL).
I'm trying to simply return entries:
query test {
  entries(section: "vacancies", limit: 20) {
    title
    expiryDate
    description
  }
}

Since the description is a custom field, this gives an error. How do I get a custom field value?

**Tags:** craft3, graphql

---

## 1 answers

### Answer by username_1 on 2020-02-26. Score: 3 | Accepted answer

For anything else than base element fields, you'll need to use an inline fragment to fetch your custom fields like so:
query test {
  entries(section: "vacancies", limit: 20) {
    title
    expiryDate
    ...on sectionHandle_entryTypeHandle_Entry {
      description
    }
  }
}

Replace sectionHandle and entryTypeHandle with your values, I guess something like vacancies_vacancies_Entry


---

