public function execute(Observer $event)
{
$gqlEditor = new GraphqlQueryEditor(); // or use dependency injection
$queryString = $event->getData('gql_container')->getData('query');
$linkType = $event->getData('type');
$path = ['products', 'items', ($linkType ? "{$linkType}_products" : 'products'), 'small_image'];
// add a single field to a result object
$queryString = $gqlEditor->addFieldIn($queryString, $path, 'url_webp');
// add multiple fields to a result object
$queryString = $gqlEditor->addFieldIn($queryString, ['products', 'items', 'products', 'image'], 'label url_webp');
// add a query argument
$queryString = $gqlEditor->addArgumentIn($queryString, ['products', 'filter', 'name'], 'match', 'Tank');
$queryString = $gqlEditor->addArgumentIn($queryString, ['products'], 'pageSize', 2);
// set updated query back on container
$event->getData('gql_container')->setData('query', $queryString);
}