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

Add Viewer to the API #829

Closed
kevinhughes27 opened this issue Aug 17, 2018 · 2 comments
Closed

Add Viewer to the API #829

kevinhughes27 opened this issue Aug 17, 2018 · 2 comments

Comments

@kevinhughes27
Copy link
Owner

part of #750

It is not currently possible to query data about the current user using GraphQl. This will be required by the new admin client to display the user's information and allow the user to update things like their name and email. Many GraphQL APIs have a viewer field that returns this information. It is also quite common to nest all the other query fields underneath viewer, I don't understand all the reasons behind this but I don't like it.

Task:

  • Add a standalone viewer field to the GraphQL api
  • Add some tests for this new field

Note - You have to run bundle exec rake schema_dump after any changes to the graphql api or else a test will fail. The admin_next client consumes this schema dump for relay which is why this is required.

@kevinhughes27
Copy link
Owner Author

@hiteshkanwar

@kevinhughes27
Copy link
Owner Author

@hiteshkanwar

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

No branches or pull requests

1 participant