Skip to content

Commit 13ea1f8

Browse files
committed
magento/graphql-ce#741: Add extension point to set custom parameters to Query Context object
- added extended docs
1 parent 8831221 commit 13ea1f8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/code/Magento/CustomerGraphQl/etc/graphql/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
</argument>
2121
</arguments>
2222
</type>
23-
</config>
23+
</config>

app/code/Magento/GraphQl/Model/Query/ContextParametersProcessorInterface.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
namespace Magento\GraphQl\Model\Query;
99

1010
/**
11-
* Extension point for adding custom parameters to context object
11+
* Adding custom parameters to context object:
12+
*
13+
* - Add new contextParametersProcessors item to ContextFactory in the di.xml.
14+
* - Class must extend ContextParametersProcessorInterface.
15+
* - Implement execute method which adds additional data to the context though extension attributes.
16+
* - This data will be present in each resolver.
1217
*/
1318
interface ContextParametersProcessorInterface
1419
{

0 commit comments

Comments
 (0)