I just used this repo first time and I found problems with arguments of queries not showing in grapqh playground
For example userPosts query has userId argument in resolver:
@ArgsType() export class UserIdArgs { @IsNotEmpty() userId: string; }
Generated queries in schema:
type Query { ... userPosts: [Post!]! }
So the playground would not execute the query. I am just learning GraphQL, so I was confused of the error.
"message": "Unknown argument \"userId\" on field \"Query.userPosts\".",
After adding @Field() decorator, all works fine.
Solved:
@ArgsType() export class UserIdArgs { @Field() @IsNotEmpty() userId: string; }
Am I missing something? Thanks.
Hi,
I just used this repo first time and I found problems with arguments of queries not showing in grapqh playground
For example userPosts query has
userId
argument in resolver:@ArgsType() export class UserIdArgs { @IsNotEmpty() userId: string; }
Generated queries in schema:
type Query { ... userPosts: [Post!]! }
So the playground would not execute the query. I am just learning GraphQL, so I was confused of the error. "message": "Unknown argument \"userId\" on field \"Query.userPosts\".",
After adding @Field() decorator, all works fine.
Solved:
@ArgsType() export class UserIdArgs { @Field() @IsNotEmpty() userId: string; }
Am I missing something? Thanks.