<p><a href="https://craftcms.com/docs/3.x/graphql.html#the-users-query" rel="nofollow noreferrer">Users query</a> will return a list of <code>UserInterface</code> objects (<a href="https://craftcms.com/docs/3.x/graphql.html#the-userinterface-interface" rel="nofollow noreferrer">docs</a>) so you will need to do something like this:</p>
<pre><code>query {
  users {
    ... on User {
      firstName
      lastName
      email
      photo {
        id
      }
      yourCustomField
      yourOtherCustomField
    }
  }
}
</code></pre>

CC BY-SA 4.0
2022-03-04T00:53:40.133Z
Thank you this is perfect.
Keatyn Garton
CC BY-SA 4.0
2022-02-21T11:46:57.660Z
2022-02-21T11:46:57.660Z
Oli
<p>I am wanting to fetch queries for custom fields of users, how would I go about doing that?</p>
<p>So if I did something like this:</p>
<pre><code>query {
users {
        id
    firstName
    lastName
    email
    photo {
      id
    }       
}
</code></pre>
<p>}</p>
<p>How would I get the custom fields I created for users?</p>

<craft3><users><query><custom-field><graphql>
How do I get custom fields of User on graphQL?
# How do I get custom fields of User on graphQL?

(Asked by: username_0 on 2022-02-18)

I am wanting to fetch queries for custom fields of users, how would I go about doing that?
So if I did something like this:
query {
users {
        id
    firstName
    lastName
    email
    photo {
      id
    }       
}

}
How would I get the custom fields I created for users?

**Tags:** craft3, users, query, custom-field, graphql

---

## 1 answers

### Answer by username_1 on 2022-02-21. Score: 2 | Accepted answer

Users query will return a list of UserInterface objects (docs) so you will need to do something like this:
query {
  users {
    ... on User {
      firstName
      lastName
      email
      photo {
        id
      }
      yourCustomField
      yourOtherCustomField
    }
  }
}

> **Comments:**
> **username_0**: Thank you this is perfect.  

---

