extractDataFromAddress = $extractDataFromAddress; } /** * @inheritdoc */ public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null) { if (!isset($value['model'])) { throw new LocalizedException(__('"model" value should be specified')); } $cart = $value['model']; $billingAddress = $cart->getBillingAddress(); if (null === $billingAddress) { return null; } $addressData = $this->extractDataFromAddress->execute($billingAddress); return $addressData; } }