I have the below query to be consumed using graphql dgs client. I have implemented the first query using com.netflix.graphql.dgs.client.codegen.GraphQLQueryRequest in which I have created a root object given below and a tocResourceGraphQLQuery to be passed in my GraphQLQueryRequest graphQLQueryRequest = new GraphQLQueryRequest(tocResourceGraphQLQuery, root); But I don't know how to implement the query inside the query using dgs client.
TocResourceProjectionRoot root = new TocResourceProjectionRoot().data().title().id()
.identifier().getParent().items().data().id().identifier().getParent().type().displayId()
.orderNo().title().availabilityTypes().getRoot();
query {
tocResource(
context: {
identifier:"urn:sbnet:book:tca1e_sbtest-1", type:"book" },
identifier:{
identifier:"urn:sbnet:book:tca1e_sbtest-1:chapter:2:section:1",
type:"section" })
{
data {
title
id {
identifier
}
items(**query**: {
filter: {isAccessible: true,availabilityTypes: [StudyPlan]},
paginationAndSorting: {offset: 0, limit:10}
}) {
data {
title
id {
identifier
}
type
displayId
orderNo
availabilityTypes
}
}
}
}
}