benawad / benawad/graphql-mongo-server
Update in mongoose
- Dominant language
- JavaScript
- Stars
- 54
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Hi there tnx for all tutorials but i need help. Lets say you have user with name email and password. you want to set a mutation for updating the user. maybe only update the name and don't change others and sometimes update name and password. so how do you write the mutation?
i wrote this: user.update({ name: args.name, email: args.email, password: args.password })
so if i only want to update name, both email and password become null. plz help
Contributor guide
No contributing guide indexed for this repository
Research direction
No source file, test, schema, or resolver entry point is named. First locate the mutation resolver containing the shown user.update call and confirm the intended partial-update behavior; done should preserve fields that the caller does not provide while updating the requested fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, javascript, mongodb
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100