How to add custom resolver fields to the automatically generated where Input fields #404
-
Hi, I have a project using prisma-typegraphql to automatically generate our queries. The queries automatically generate filters under the "where" object, which is awesome. Unfortunately, I also have a custom FieldResolver that I added to one object type. I would like to be able to access this as a filter under the "where" input arg, but these custom fields do not show up here. Would anyone know how I can get these custom fields to show up as filter options, or is this not possible? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's not possible - custom fields does not exists in the db, so it makes no sense to include them in the db filter. |
Beta Was this translation helpful? Give feedback.
It's not possible - custom fields does not exists in the db, so it makes no sense to include them in the db filter.
Such filter just would not work - the values of custom field resolvers are unknown, you need to call the field resolvers to get the value to then filter by.