You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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".",
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.
The text was updated successfully, but these errors were encountered: