-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hi,
This looks like a great library. I've been experimenting with it and I'm wondering if there are any plans on adding a select field feature and eventaually something to accomodate cursor pagination. I'm looking at exploring this myself and was wondering if you could give me some guidance as I continue to wrap my head around things.
Some notes:
- I'm already able to add a field to the DTO called select of type
string[]which generates an array of all field names passed through the query string - The field names in
select: string[]that are also within the keys array should be added to a select query field in findOptions - Field names specified within the select query field that are also within the compound keys array should added to an include query field in findOptions
- Generated prisma select and include statements returned from findOptions are optional and can be equal to null but must not be not-null at the same time
- I've noted that
<prismamodel>WhereInputtype is used to initialise the DirectFilterPipe instead of something like<prismamodel>FindManyArgswhich is making it hard for me to figure out how to add select and include fields with non-null type to generateQueryFindOptions and GeneratedFindOptions. - I've tried adding and/or subsbtituting the
<prismamodel>FindManyArgstype into the IGeneratedFilter interface and dependant types to get these extra select, include and cursor types from prisma to play with but with no success so far. - Using the
<prismamodel>FindManyArgstype may also make it easier to add cursor handling functionality in the future?
If I can figure it out in the meantime I'll make a pull request if you like. I'm also happy to pair with someone on your team if that appeals to you.
Thanks
Metadata
Metadata
Assignees
Labels
No labels