Skip to content

Commit

Permalink
Implement new toFluent transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
xHeaven committed Oct 31, 2024
1 parent 4329a33 commit 7bc6206
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/GraphQLClientTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Luminarix\Shopify\GraphQLClient;

use Illuminate\Support\Collection;
use Illuminate\Support\Fluent;
use InvalidArgumentException;

readonly class GraphQLClientTransformer
Expand All @@ -22,6 +23,11 @@ public function toArray(): array
return $this->data;
}

public function toFluent(): Fluent
{
return fluent($this->data);
}

public function toCollection(): Collection
{
return collect($this->data);
Expand Down

0 comments on commit 7bc6206

Please sign in to comment.