Hi — I’ve been following along with a GraphQL/Pris...
# orm-help
r
Hi — I’ve been following along with a GraphQL/Prisma tutorial (https://www.howtographql.com/graphql-js/6-authentication/) and one of the ‘unlock the next page’ questions they asked is one that’s got me puzzled. Specifically, I’m wondering why one redefines types in the application schema when they are already part of the Prisma database schema and could be imported from there. The answer the tutorial gives is “To hide potentially sensitive information from client applications”, but I’m afraid I don’t understand it. What does this mean, to you, and why, indeed, do we replicate definitions in ‘schema.graphql’ and ‘datamodel.prisma’? Specifically in ‘schema.graphql’ I have
Copy code
type User {
    id: ID!
    name: String!
    email: String!
    links: [Link!]!
}
and in ‘datamodel.prisma’ I have
Copy code
`
type User {
    id: ID! @unique
    name: String!
    email: String! @unique
    password: String!
    links: [ Link!] !
}