diff --git a/src/GraphQLClientCreate.php b/src/GraphQLClientCreate.php index ff89cd2..a9920f7 100644 --- a/src/GraphQLClientCreate.php +++ b/src/GraphQLClientCreate.php @@ -6,15 +6,13 @@ use Luminarix\Shopify\GraphQLClient\Authenticators\Abstracts\AbstractAppAuthenticator; use Luminarix\Shopify\GraphQLClient\Contracts\RateLimitable; -use Luminarix\Shopify\GraphQLClient\Integrations\ShopifyConnector; class GraphQLClientCreate { public function create( AbstractAppAuthenticator $appAuthenticator, - ?ShopifyConnector $connector = null, ?RateLimitable $rateLimitService = null, ): GraphQLClientMethods { - return new GraphQLClientMethods($appAuthenticator, $connector, $rateLimitService); + return new GraphQLClientMethods($appAuthenticator, $rateLimitService); } } diff --git a/src/GraphQLClientMethods.php b/src/GraphQLClientMethods.php index 4404253..6c46a93 100644 --- a/src/GraphQLClientMethods.php +++ b/src/GraphQLClientMethods.php @@ -19,6 +19,8 @@ class GraphQLClientMethods { use Macroable; + private ?ShopifyConnector $connector = null; + private float|int|null $requestedQueryCost = null; private float|int|null $actualQueryCost = null; @@ -35,10 +37,9 @@ class GraphQLClientMethods public function __construct( private readonly AbstractAppAuthenticator $appAuthenticator, - private ?ShopifyConnector $connector = null, private ?RateLimitable $rateLimitService = null, ) { - $this->connector ??= new ShopifyConnector($this->appAuthenticator); + $this->connector = new ShopifyConnector($this->appAuthenticator); $this->rateLimitService ??= new RedisRateLimitService($this->appAuthenticator->getShopDomain()); }