Since Golang ent library will automatically generate the graphql schema base the struct , but it will also generate the whole schema include something you don't want to expose to client, for example like "hassedpassword" ,
type User implements Node {
id: ID!
userName: String!
hassPassword: String!
email: String!
}
type User struct {
ID int64 `json:"id"`
UserName string `json:"userName"`
HassPassword string `json:"hassPassword"`
Email string `json:"email"`
}
due to it is automatically generated by library ent and gqlgen, you can't edit the schema , so I try to return a empty Hasspassword to client at resolver level ,it works well , but I found that users can see the hashed password structure , when they interact with the playground , though it return nothing , is this ok ? is there a way to prevent expose the hashed password to the client ?
Is there a way to prevent expose the hashed password structure to the client ? or you think this is totally fine ?