This repository was archived by the owner on Mar 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -98,11 +98,12 @@ public function __construct($app)
98
98
*
99
99
* @param string $query
100
100
* @param array $variables
101
+ * @param mixed $rootValue
101
102
* @return array
102
103
*/
103
- public function query ($ query , $ variables = [])
104
+ public function query ($ query , $ variables = [], $ rootValue = null )
104
105
{
105
- $ result = $ this ->queryAndReturnResult ($ query , $ variables );
106
+ $ result = $ this ->queryAndReturnResult ($ query , $ variables, $ rootValue );
106
107
107
108
if (!empty ($ result ->errors )) {
108
109
return [
@@ -119,11 +120,12 @@ public function query($query, $variables = [])
119
120
*
120
121
* @param string $query
121
122
* @param array $variables
123
+ * @param mixed $rootValue
122
124
* @return array
123
125
*/
124
- public function queryAndReturnResult ($ query , $ variables = [])
126
+ public function queryAndReturnResult ($ query , $ variables = [], $ rootValue = null )
125
127
{
126
- return GraphQLBase::executeAndReturnResult ($ this ->schema (), $ query , null , $ variables );
128
+ return GraphQLBase::executeAndReturnResult ($ this ->schema (), $ query , $ rootValue , $ variables );
127
129
}
128
130
129
131
/**
You can’t perform that action at this time.
0 commit comments