I am working on apollo client library for integrating graphql with angular. I am able to do simple queries like findAll without any arguments
const allData =
gql`
query allData {
allData {
id
fromDate
toDate
name
...
}
}
`
I am able to fetch result with this query using watchQuery
this.data = this.apollo.watchQuery<Query>({query: allData}).valueChanges
.pipe(
map(result => result.data.allData)
);
but I am not able to create a complex query with arguments like
{
allDataWithFilter(
date: {from: "2010-01-16T10:20:10", to: "2019-01-16T11:16:10"},
name: "ABC" {
allDataWithFilter {
id
fromDate
toDate
name
...
}
totalPages
totalElements
}
}
How do I pass date and other arguments in the query?