The query resolver – the REST API endpoint