Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name field in keystone #374

Open
shobhit-stan opened this issue Nov 16, 2021 · 1 comment
Open

Name field in keystone #374

shobhit-stan opened this issue Nov 16, 2021 · 1 comment

Comments

@shobhit-stan
Copy link

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?

@dcousens
Copy link
Member

dcousens commented Dec 7, 2021

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

@dcousens dcousens transferred this issue from keystonejs/keystone Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants