Skip to content

Commit

Permalink
Allow registering already-instantiated GQL directives.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrog committed Dec 16, 2022
1 parent 9cf3beb commit 4dc97c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/Gql.php
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ private function _loadGqlDirectives(): array

foreach ($event->directives as $directive) {
/** @var Directive $directive */
$directives[] = $directive::create();
$directives[] = $directive instanceof Directive ? $directive : $directive::create();
}

return $directives;
Expand Down

0 comments on commit 4dc97c0

Please sign in to comment.