Using `prisma plugin`, why is the "array" queries ...
# graphql-nexus
m
Using
prisma plugin
, why is the "array" queries allow for more filtering instead of only filtering by the indexes, where as the "single" queries do not. Is there something I can do, a setting, on either nexus schema, plugin prisma or prisma itself to allow that? Look at how the people query allow for more filtering, where the person does not
r
Hey @Matheus Assis πŸ‘‹ The reason being that the β€œsingle” queries only query for a unique value i.e. the
id
or something unique, which is why you cannot add extra filtering options. In this case you would either need to use the defaults provided by Nexus i.e. passing unique params or creating a custom resolver. I would also suggest creating a feature request for the same here.
m
I see. That's unfortunate, i'll end up using the array queries and get the first element. I just want to grab a
person
by its slug(which is unique) and if
isPublished
is true,
isPublished
is not unique so it doesn't allow me to do that
Thank you!
πŸ™Œ 1
r
Do create the feature request though if you have time πŸ™‚
πŸ‘ 1
m
Thanks! I just crated the feature request: https://github.com/graphql-nexus/schema/issues/613
πŸ™Œ 1