Answer the question
In order to leave comments, you need to log in
How to write a Graphql query correctly in my case?
Good day!
i have a little problem with graphql query
if i have public List AdvertisementsByFiltersearch(Filter filter) method on backend
where filter:
public Filter(boolean usefilter, Integer Topprice, Integer Lowprice, SortingPrinciple SortingPrincipl, String Name, Set Idtags){
this.usefilter= usefilter;
this.topprice=topprice;
this.sortingprinciple=SortingPrinciple;
this.lowerprice=Lowprice;
this.idtags=Idtags;
this.name=Name;
}
public enum SortingPrinciple {
popularity,
price,
age
}
then how can I write some kind of request to this method?
photo in Alteir GRAphql client
Answer the question
In order to leave comments, you need to log in
The mere presence of a method does not give you the right to call it through GraphQL queries. What and how can be requested - the scheme answers. Actually, you can see the diagram on the screenshots. filter is a named object. In requests, parameters are passed in the following form:
query {
someQuery(
argName: argValue,
...
){
....fields
}
}
query {
advertisementsByFiltersearch(
filter: {
name: "Name"
usefilter: true
lowerprice: 300
}
){
....fields
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question