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

Flag for returning User data #958

Open
gezquinndesign opened this issue May 1, 2020 · 1 comment
Open

Flag for returning User data #958

gezquinndesign opened this issue May 1, 2020 · 1 comment

Comments

@gezquinndesign
Copy link
Contributor

gezquinndesign commented May 1, 2020

Feature request

Is your feature request related to a problem?

So the problem I encountered came about when I was creating an 'account settings' page for my app that uses GraphQL transport with Mongo. The purpose of this page is to allow users to update their profile, email, username, etc. When writing the resolvers for the various update tasks, I found that none of the methods in the accounts packages return the updated user data after they run. This means I have to make a separate call to the database to retrieve the updated user data to return that back to the client.

Describe the solution you'd like

I think it would be good to have a way for people using the accounts methods to specify that they would also like the updated user data to be returned after any operation that updates the user. This could be behind a flag or by adding/updating the relevant methods already in the packages.

Returning the user (or user fragments) in graphql reponses can also be beneficial for automatic cache updates.

@ghost
Copy link

ghost commented Jul 3, 2020

@pradel I'm also having to write more complex resolvers to update additional user info. Thought I'd one up this issue 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant