hi i am trying to query id from user , the select ...
# orm-help
m
hi i am trying to query id from user , the select statement is always selecting all and not id or the specified field , can any one help
c
can you paste the query you're running?
m
ok 1 second
Copy code
query {
  user(id:"%USERID%") { 
  	email
  }
}
it select all fields in user table first
name , password etc..
while I only need the email field
@cedric any help would be appreciated brother
c
apologies, i got pulled into a phone call
it's possible that it selects all fields from the database by-design, but then filters what gets returned by the graphql response based on the fragment
i'm not certain of the internals on how prisma constructs its sql queries unfortunately
m
thank you @cedric
but isn't there a way to optimize that?
is there a way to solve that?