i want to Query only selected fields using Apollo graphql in java.
Dont find any article which shows how we can achieve that
I define my query in .graphql file like this,
query getResources{
resources(filterBy: {} ) {
edges{
cursor
node {
id
name
canonicalName
description
createdAt
updatedAt
createdBy
updatedBy
}
}
pageInfo{
hasPreviousPage
hasNextPage
}
}
}
while making the query request execute = apolloClient.query(getResourcesQuery).execute();
i want to change the getResourcesQuery object to only query certain fields. how can we do that ?