@@ -45,7 +45,7 @@ class GraphQL
4545 * value or method on the source value with the field's name).
4646 *
4747 * @param Schema $schema
48- * @param string|DocumentNode $requestString
48+ * @param string|DocumentNode $source
4949 * @param mixed $rootValue
5050 * @param array|null $variableValues
5151 * @param string|null $operationName
@@ -54,7 +54,7 @@ class GraphQL
5454 */
5555 public static function execute (
5656 Schema $ schema ,
57- $ requestString ,
57+ $ source ,
5858 $ rootValue = null ,
5959 $ contextValue = null ,
6060 $ variableValues = null ,
@@ -64,7 +64,7 @@ public static function execute(
6464 {
6565 $ result = self ::executeAndReturnResult (
6666 $ schema ,
67- $ requestString ,
67+ $ source ,
6868 $ rootValue ,
6969 $ contextValue ,
7070 $ variableValues ,
@@ -88,7 +88,7 @@ public static function execute(
8888 * which can be used for custom error formatting or adding extensions to response
8989 *
9090 * @param Schema $schema
91- * @param string|DocumentNode $requestString
91+ * @param string|DocumentNode $source
9292 * @param mixed $rootValue
9393 * @param array|null $variableValues
9494 * @param string|null $operationName
@@ -97,7 +97,7 @@ public static function execute(
9797 */
9898 public static function executeAndReturnResult (
9999 Schema $ schema ,
100- $ requestString ,
100+ $ source ,
101101 $ rootValue = null ,
102102 $ contextValue = null ,
103103 $ variableValues = null ,
@@ -106,11 +106,10 @@ public static function executeAndReturnResult(
106106 )
107107 {
108108 try {
109- if ($ requestString instanceof DocumentNode) {
110- $ documentNode = $ requestString ;
109+ if ($ source instanceof DocumentNode) {
110+ $ documentNode = $ source ;
111111 } else {
112- $ source = new Source ($ requestString ?: '' , 'GraphQL request ' );
113- $ documentNode = Parser::parse ($ source );
112+ $ documentNode = Parser::parse (new Source ($ source ?: '' , 'GraphQL ' ));
114113 }
115114
116115 /** @var QueryComplexity $queryComplexity */
0 commit comments