Skip to content

Commit

Permalink
magento/graphql-ce#741: Add extension point to set custom parameters …
Browse files Browse the repository at this point in the history
…to Query Context object
  • Loading branch information
naydav committed Jun 13, 2019
1 parent 5d12f8e commit ed35766
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
13 changes: 8 additions & 5 deletions app/code/Magento/GraphQl/Model/Query/ContextFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ public function create(): ContextInterface
$contextParameters->getExtensionAttributes()
);

$context = $this->objectManager->create(ContextInterface::class, [
'userType' => $contextParameters->getUserType(),
'userId' => $contextParameters->getUserId(),
'extensionAttributes' => $extensionAttributes,
]);
$context = $this->objectManager->create(
ContextInterface::class,
[
'userType' => $contextParameters->getUserType(),
'userId' => $contextParameters->getUserId(),
'extensionAttributes' => $extensionAttributes,
]
);
return $context;
}
}
1 change: 0 additions & 1 deletion app/code/Magento/GraphQl/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"type": "magento2-module",
"require": {
"php": "~7.1.3||~7.2.0",
"magento/module-authorization": "*",
"magento/module-eav": "*",
"magento/framework": "*"
},
Expand Down

0 comments on commit ed35766

Please sign in to comment.