diff --git a/src/GraphQL.php b/src/GraphQL.php index a30d077..de3cb51 100644 --- a/src/GraphQL.php +++ b/src/GraphQL.php @@ -149,7 +149,7 @@ public function execute($query, $variables = [], $opts = []) { * @return array * @static */ - static public function formatGraphQLException($e): array { + public static function formatGraphQLException($e): array { $debug = false; // if debug mode is activated, we have to include debug message and diff --git a/src/Support/Transformer/Transformer.php b/src/Support/Transformer/Transformer.php index e7de2a1..766fdf4 100644 --- a/src/Support/Transformer/Transformer.php +++ b/src/Support/Transformer/Transformer.php @@ -120,9 +120,10 @@ public function getArguments(Definition $definition) { if (is_callable($pipe)) { continue; } - + // pipe string definition may contain parameters, that are separated from the pipe class name with semicolon + $parsedPipeString = explode(':', $pipe, 2); // a class pipe can handle argumentable interface - $pipe = $this->app->make($pipe); + $pipe = $this->app->make($parsedPipeString[0]); if ($pipe instanceof \StudioNet\GraphQL\Support\Pipe\Argumentable) { $args = array_merge($args, $pipe->getArguments($definition));