The "people" query returns a collection of Person objects. The "people" query can accept various attributes - a list of person IDs, part of a name, or pagination options.
Queries from an application-authenticated WWClient can only use a list of IDs as an attribute. A query using any other attribute (or no attributes at all) from application-authenticated WWClient just return an HTTP 500 error. This is because those queries are looking for people within your organisation. But an application does not have an organisation.
The org.opencode4workspace.builders.PeopleGraphQLQuery class has two simple static helper methods available:
Similar methods are also available from WWClient and WWGraphQLEndpoint.
For greater control, create an ObjectDataSenderBuilder for the Person.PEOPLE_QUERY_OBJECT_NAME object, adding attributes as appropriate, passing in Person fields and children. Instantiate a new PeopleGraphQLQuery passing in the ObjectDataSenderBuilder as the parameter. Then pass this to WWClient.getPeopleWithQuery(). SInce 0.8.0 you can also pass this to WWClient.getPeopleContainerWithQuery(). The first one just returns the List of Person objects, the second one gives access to the MembersContainer, which gives access to the PageInfo object and the List of Person objects.