-
Notifications
You must be signed in to change notification settings - Fork 679
Open
Description
What happened?
Description
Users fields are not appearing in GraphQL entry type schemas, even when they are properly configured in the field layout and GraphQL schema permissions are enabled. The field appears in the GraphiQL documentation explorer under the generic entries interface but not under specific entry type interfaces, and queries fail with "Cannot query field" errors.
Steps to reproduce
- Create a Channel section
- Create a Users field and add it to that Channel's field layout
- Enable the section in GraphQL schema
- Make a GraphQL query to retrieve entries from that section
Expected behavior
Entries should be returned with the Users field accessible and queryable.
GraphQL Query Example:
{
entries(section: "mySection") {
title
... on mySection_myEntryType_Entry {
myTextField # This works
myUsersField { # This fails
fullName
}
}
}
}
Actual behavior
The Users field cannot be queried and returns errors like:
{
"errors": [
{
"message": "Cannot query field \"[fieldHandle]\" on type \"[section]_[entryType]_Entry\".",
"extensions": {
"category": "graphql"
}
}
]
}
Craft CMS version
4.16.13
PHP version
8.0.2
Operating system and version
macOS 15.6.1 (24G90)
Database type and version
Postgres 13
Image driver and version
No response
Installed plugins and versions
- besteadfast/craft-preparse-field: ^2.1.2
- cooltronicpl/document-helpers: ^3.0.0
- craftcms/cms: ^4.16.13
- craftcms/element-api: ^4.2.0
- craftcms/redactor: ^3.1.0
- doublesecretagency/craft-cpcss: 2.6.0
- ether/tags: ^2.0.0
- mmikkel/incognito-field: ^1.3.0
- nystudio107/craft-seomatic: ^4.1.16
- verbb/super-table: ^3.0
- verbb/workflow: 2.0.15
- vlucas/phpdotenv: ^3.4.0