How to get custom field from user profile?

Hi,
I’ve added a custom field to the user profile (“Firstname”). How to get the contents of that field using a query?

query MyQuery {
users(ids: 18245638) {
email
id
name
title
}
}

Adding “firstname” to the list of fieldnames results in “Field ‘firstname’ doesn’t exist on type ‘User’”. How to get the fieldname?

Thanks,

Jaap

Hey there @Jaap-CAD2M :wave:

At this time, I’m afraid it is not possible to query custom User fields via the API. In this specific case, it seems like you could query the “name” field instead, but I definitely understand you might have wanted to query a custom field that stores information not available in other user fields.

I’ve passed this as an improvement suggestion to our product team :slight_smile: That said, I can’t confirm when or whether this would be part of our API at this time.

I hope this helps clarify!

-Alex

1 Like