keystone-5 icon indicating copy to clipboard operation
keystone-5 copied to clipboard

Name field in keystone

Open shobhit-stan opened this issue 4 years ago • 1 comments

I have a name field on user in my postgresql database.

const userFields = {
    fields: {
        phone: {
            type: Text,
            isUnique: true,
        },
        name: {
            type: Text,
        },
        username: {
            type: Text,
        },
        user_type: {
            type: Select,
            options: [
                { value: 'ADMIN', label: 'Admin' },
                { value: 'USER', label: 'User' }
            ]
        },
        email: {
          type: Text,
          isUnique: true,
        },
        password: {
          type: Password,
        },
        joinedRooms: {
            type: Relationship,
            ref: 'player.followers',
            many: true,
            isRequired: false
        },
    },
    labelResolver: item => item.email,
}

Now this name can also be null if user don't pick a name first. Now keystone don't load up tuples where name is null. I then use another labelResolver as put it as email but still keystone is not loading name null fields. Should there not be a command to override the default summary or label field keystone uses?

shobhit-stan avatar Nov 16 '21 20:11 shobhit-stan

@shobhit-stan I think this is for Keystone 5. Could you post a screenshot for the problem you're facing?

dcousens avatar Dec 07 '21 00:12 dcousens