I made the followig schema.graphqls
type BlogPost {
blog_post_id: ID
title: String
post: String
}
input BlogpostAttributeFilterInput {
page: Int
limit: Int
}
type Query {
allBlogPosts(input: BlogpostAttributeFilterInput) :
[BlogPost] @resolver(class: "\MageGuide\FirstModule\Model\Resolver\GetBlogPosts")
@doc(description:"Retrieve All BlogPosts")
@cache(cacheable: false)
}
And I want to provide some arguments towards the request allBlogPosts
I tried in my tool:
{
allBlogPosts(page:1,limit:10){
blog_post_id
title
post
}
}
But I got the following error:
{
"errors": [
{
"message": "Unknown argument "page" on field "allBlogPosts" of type "Query".",
"locations": [
{
"line": 2,
"column": 15
}
]
},
{
"message": "Unknown argument "limit" on field "allBlogPosts" of type "Query".",
"locations": [
{
"line": 2,
"column": 22
}
]
}
]
}
How I can provide the arguments towards the request?