Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

ACF not showing when rule is set to user role #58

@jydmnd

Description

@jydmnd

When creating an ACF and setting the rules as:
Show this field group if:
User role is equal to ROLE
The ACF field isn't queryable through the viewer (when authenticated). Here is an example query :

query getViewer {
  viewer {
    id
    username
    name
    userId
    myacf
  }
}

This returns this error :

{
  "errors": [
    {
      "message": "Cannot query field \"myacf\" on type \"User\".",
      "category": "graphql",
      "locations": [
        {
          "line": 7,
          "column": 5
        }
      ]
    }
  ]
}

It works when the rule is set as User role is equal to All, but will show on every user profile, which is not ideal.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions