graphql-prisma-typescript icon indicating copy to clipboard operation
graphql-prisma-typescript copied to clipboard

Explanation of Viewer

Open harrisrobin opened this issue 7 years ago • 0 comments

Hi,

I am a bit confused by Viewer in this example.

First of all, why is this necessary: https://github.com/prismagraphql/graphql-server-example/blob/800506efcacb15c2e16bdb6d5a42ea275070a095/src/resolvers/Query.ts#L6

It seems to be doing nothing, yet if i look at schema.graphql here you have viewer in the type Query. I guess it's to match that signature, however why are we putting Viewer here in this case, next to Mutation and Query?

This example works but I'd love a little clarification on Viewer!

harrisrobin avatar Jul 09 '18 10:07 harrisrobin