Modification of searchUser method to facilitate POD usecase
Context
Ketida server exposes a searchForUsers
here mutation with a certain functionality. We need to enhance that existing function in order to be able to serve also the requirements of POD client. This mutation is used mainly during the team members assignment on a book level. On the client side we usually have an input field where the end user can start typing and based on some criteria existing users will appear as options for selection. For the case of POD project we would like the outcome of the mutation to return results only when we have exact matches.
Proposal
Design
Implementation (if applicable)
- modify this by adding a new param
exactMatch:Boolean
- read and pass that param to the controller if exists https://gitlab.coko.foundation/ketida/server/-/blob/main/api/graphql/user/user.resolvers.js#L11
- modify this in order to use the new param when exists
- modify this so when the new param exists then only users with exact match of email will be retuned back to the client.