Include in FindManyXArgs
See original GitHub issueHi,
I was wondering if there’s a way to add the include argument in the FindManyXArgs.
Something like the one prisma autogenerates
Currenty this is what it generates
@ArgsType()
export class FindManyUserArgs {
@Field(() => UserWhereInput, {nullable:true})
where?: UserWhereInput;
@Field(() => [UserOrderByWithRelationInput], {nullable:true})
orderBy?: Array<UserOrderByWithRelationInput>;
@Field(() => UserWhereUniqueInput, {nullable:true})
cursor?: UserWhereUniqueInput;
@Field(() => Int, {nullable:true})
take?: number;
@Field(() => Int, {nullable:true})
skip?: number;
@Field(() => [UserScalarFieldEnum], {nullable:true})
distinct?: Array<keyof typeof UserScalarFieldEnum>;
}
I’d need something like this
@ArgsType()
export class FindManyUserArgs {
...
@Field(() => UserIncludeInput, { nullable: true })
include?: UserIncludeInput;
}
The reason is because I need to run queries like this
Thanks in advance!
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
How can I pass all arguments with xargs in middle of ...
I want to pass all the files as a single argument on Linux but I am not able to do that. This is...
Read more >How to Use the Linux xargs Command - phoenixNAP
The xargs command builds and executes commands provided through the standard input. Learn how to use it with practical examples.
Read more >xargs(1) - Linux manual page - man7.org
xargs - build and execute command lines from standard input ... Because Unix filenames can contain blanks and newlines, this default behaviour is...
Read more >findutils: ChangeLog - 4.6.0 vs. 4.7.0 changes | Fossies Diffs
Source code changes report for the member file ChangeLog of the findutils software package between the versions 4.6.0 and 4.7.0.
Read more >xargs - Construct an argument list and run a command - IBM
-n number: Specifies xargs is to read the given number of arguments from the standard input and put them on the end of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
why didn’t put a doccument on this ?
There is no such options for generator. But I think ‘select’ is more suitable for this case. You can reinvent the wheel and create your own fields parser, similar to https://github.com/Robert-W/graphql-outfields and use result in ‘select’ property of ‘findMany’ method.