eelke
06/19/2018, 10:02 PMtype Foo {
foo: String
privateBar: String
}
`src/schema.graphql`:
type Foo {
foo: String
}
Dukuo
06/19/2018, 10:04 PMsrc\schema.graphql
is a from the GraphQL server connecting to your Prisma schemaMoritz
06/19/2018, 10:18 PMKyleG
06/19/2018, 10:47 PMpassword
field and only sometimes expose my User's email
field.
The no-password, no-email is default User
type, which the other Schemas will return (say for example, if it's a blog, you can look up a User
in the Author field of a Post
.
https://github.com/TiE23/metric-teacher/blob/ISSUE-020/server/src/schema.graphql#L96
But for cases where a User wants to look at their own data (like on their settings page) and expose their email (but still not their password) my type PrivateUser
will be returned in my me
query.
https://github.com/TiE23/metric-teacher/blob/ISSUE-020/server/src/schema.graphql#L109eelke
06/20/2018, 6:59 AM