Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/GraphQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/Support/Transformer/Transformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down