Custom field in User entity

Created on 24 August 2023, over 1 year ago
Updated 25 January 2024, 11 months ago

Problem/Motivation

Enabled the custom fields & user picture field in User entity but it is not showing in the explorer.

💬 Support request
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India rajghai

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @rajghai
  • 🇨🇭Switzerland dulnan

    There is currently a "hidden" feature that does not generate entity reference fields (even if they're enabled), if the field references an entity type that is not enabled in your schema. In your case, if the picture field on the user is a reference to a media, then you'll also have to enable the media entity type. Could you check if this is the case?

  • Status changed to Fixed 11 months ago
  • 🇨🇭Switzerland ayalon

    This is possible. You need to enable:

    • User Entity
    • Fields of the user like name, userPicture
    • Enable the image extension to fetch image derivatives
    • Checkbox: Enable field values
    • Cache clear after saving
    • Check permissions when querying because anonymous user is usually not allowed to query the user profile
    query MyQuery {
      entityById(entityType: USER, id: 1) {
        ... on User {
          id
          name
          userPicture {
            width
            height
            derivative(style: LARGE) {
              width
              urlPath
              height
            }
          }
        }
      }
    }
    
  • Status changed to Fixed 11 months ago
Production build 0.71.5 2024