Skip to content

If an admin searches for a user by email, don't crash if no user can be found

Hannes Heine requested to merge pr2295head into pr2295base

Created by: Tirokk

roschaefer Authored by roschaefer Merged


Ideally we would not have this inconsistent edge case that we filter through the user type. Much better would be a graphql query like:

{
  User(filter: { primary_email: { email: "something@example.org" } }) {
    id
    name
    slug
  }
}

EDIT I tried to implement the above behaviour and I think it's OK to have this edge case. Reason: you could nest _UserFilter indefinitely. So it becomes complex and risky to create a graphql-shield rule based on args.filter.primary_email.

Keeping it simple stupid and having this one inconsistency is OK I would say.

Fix #2294

Merge request reports