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

Viewer concept for Mutations #510

Closed
ashah888 opened this issue Oct 9, 2016 · 1 comment
Closed

Viewer concept for Mutations #510

ashah888 opened this issue Oct 9, 2016 · 1 comment

Comments

@ashah888
Copy link

ashah888 commented Oct 9, 2016

Is it a good practice to have a viewer for GraphQL mutations? Theoretically this makes sense to me as some mutation end points shouldn't be possible if you are not logged in, etc.

But when I see examples on the web, I only see implementation of GraphQL viewers for queries. For mutations, I do not see any implementation of viewers. For example, the GitHub API doesn't have a viewer on top of all their mutations.

@stubailo
Copy link

stubailo commented Oct 9, 2016

I don't think this issue tracker is the correct place to talk about these questions, but I've answered your question on Stack Overflow: http://stackoverflow.com/questions/39938560/graphql-viewer-for-mutations/39939747#39939747

The TL;DR is, there is no reason to use viewer in GraphQL.js, since you should do authorization via the context.

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

2 participants