TownHallHQ / TownHall

MIT License
27 stars 13 forks source link

Query with invalid filter returns unfiltered user search results #136

Open Michael-Liendo opened 11 months ago

Michael-Liendo commented 11 months ago

When a GraphQL query is executed using the filter in the user search and an invalid character is provided in the filter, the system incorrectly returns all users instead of displaying an empty result or handling the filter error properly.

query {
  user(filter: { username: "michael-liendo" }) {
    nodes {
      name
      email
      username
    }
  }
}

Expected Result: The query should return an empty result or generate an error message indicating that the filter is invalid and cannot be applied to the user search. Alternatively, the filter error could be handled appropriately and display an informational message instead of returning all users.

Actual Result: The query returns all existing users in the database, which is not the expected behavior.