Title: Make GraphQL/Prisma fields private/not able to be queried
Tags: postgresql;graphql;prisma
Question: I'm using Prisma ORM with GraphQL.
I've got a user type, and for obvious reasons, I don't want the password field able to be queried. Is there any way to do this, either in Prisma, or GraphQL (or PostgreSQL)?
Comment: https://www.prisma.io/docs/reference/database-reference/database-features#misc - not supported, yet ? https://www.prisma.io/docs/guides/upgrade-guides/upgrade-from-graphcool#implementing-an-api-server-including-authentication--authorization


Here is another answer: Currently you can use select to fetch the fields that you require and omit the ones that need to be private.
There's a request here for the same that will allow to exclude specific fields.

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2021:00:03/29/21', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<postgresql><graphql><prisma>', 'Title': 'Make GraphQL/Prisma fields private/not able to be queried', 'ViewCount': 247, 'id': 66860066, 'user_AboutMe': '', 'user_AccountId': 13839594.0, 'user_DisplayName': 'Filip', 'user_Reputation': 774.0, 'user_Views': 161.0, 'user_id': 9990279.0}}