However, when I try to run `prisma generate` it sa...
# graphql-nexus
b
However, when I try to run
prisma generate
it says it can’t find
IntFilter
and
StringFilter
. This historically has worked when we used
crud
. How can I leverage prisma client’s filtering methods?
r
Hey @Ben Chen 👋
prisma generate
is only for generating the types for the models you have created. The
IntFilter
and
StringFilter
inputs are generated by Nexus CRUD. You can enable CRUD and write the required crud operation to get all the filters to directly use in your resolvers or manually create them.
m
@Ryan can we generate "Filter" types only without exposing crud ?
r
@Mikastark That’s not possible directly with Nexus. You would need to use this community made plugin to achieve that.
m
Thanks 🙂 Another workaround I actually use is to expose crud and disallow access to it with AuthorizePlugin. I asked you, in case there is a "proper" solution.
r
There’s no proper solution as exposing CRUD will expose the Queries/Mutations 🙂