Join Slack
Communities
Powered by
In the React boilerplate what does the commented o...
# orm-help
j
Jim
05/13/2018, 11:05 AM
In the React boilerplate what does the commented out input in schema.graphql do? # import Post from “./generated/prisma.graphql”
https://github.com/graphql-boilerplates/react-fullstack-graphql/blob/master/advanced/server/src/schema.graphql
w
weakky
05/13/2018, 11:28 AM
it imports the model Post
https://github.com/graphcool/graphql-import
j
Jim
05/13/2018, 11:36 AM
So in that example could you import User in the same way and then remove how it’s currently declared? (line 27) type User { id: ID! email: String! name: String! posts: [Post!]! }
w
weakky
05/14/2018, 7:48 AM
Absolutely
n
nilan
05/14/2018, 9:03 PM
no, because the
User
model has a
password
field
nilan
05/14/2018, 9:03 PM
redefining it like that ensures that
password
is not query-able
4
Views
Open in Slack
Previous
Next