Email fields are added to the WPGraphQL Schema as a field with the Type String
.
Email fields can be queried and a String will be returned.
Here, we have an Email field named email
on the Post Edit screen within the "ACF Docs" Field Group.
This field can be Queried in GraphQL like so:
{
post( id: "acf-example-test" idType: URI ) {
acfDocs {
email
}
}
}
and the results of the query would be:
{
"data": {
"post": {
"acfDocs": {
"email": "[email protected]"
}
}
}
}
- Previous Field: Date/Time Picker
- Next Field: File