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

Wrong list key used for authenticate mutation #2900

Closed
pimvanderheijden opened this issue May 5, 2020 · 0 comments · Fixed by #2901
Closed

Wrong list key used for authenticate mutation #2900

pimvanderheijden opened this issue May 5, 2020 · 0 comments · Fixed by #2901

Comments

@pimvanderheijden
Copy link

Bug report

Describe the bug

Not entirely sure if this is a bug but it sure seems like one. If not, I think something is missing or not clearly documented yet.

To Reproduce

  1. Go to /admin
  2. Log in
  3. Look at the network tab
  4. See error in response body: Cannot query field "authenticateusersWithPassword" on type "Mutation". Did you mean "authenticateUserWithPassword"?

Expected behaviour

I expect authenticateUserWithPassword to be used when the mutation exists and it does exist in my setup:

image

Additional context

Found related code here, look for listKey on line 86. Not really sure what sets the value: https://github.com/keystonejs/keystone/blob/master/packages/app-admin-ui/client/pages/Signin.js

I've tried different combinations plural, singular, itemQueryName, listQueryName, label. I have an existing MariaDB table named "users" and it looks like the only way to use that table is by using a list called "users" too. My current model:

keystone.createList('users', {
    plural        : 'users',
    singular      : 'user',
    itemQueryName : 'User',
    listQueryName : 'Users',
    label         : 'Users',
    // tableName     : 'users',
    fields        : {
        password_hash : {
            type : Password,
        },
        email : {
            type       : Text,
            isRequired : true
        }
    }
})
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

Successfully merging a pull request may close this issue.

1 participant