Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing arg fields in Schema #486

Open
rastislavkopal opened this issue Aug 16, 2023 · 1 comment
Open

Missing arg fields in Schema #486

rastislavkopal opened this issue Aug 16, 2023 · 1 comment

Comments

@rastislavkopal
Copy link

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.

@nhvu95
Copy link

nhvu95 commented Feb 22, 2024

Thank you a lot, It's save me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants