From 15e6267d8910d70d1714a717debfae702880cd0c Mon Sep 17 00:00:00 2001 From: Thiago Brasil Date: Mon, 14 Apr 2025 11:07:56 -0400 Subject: [PATCH] add method to set auth token in GraphQL client --- src/GraphQL/Client.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/GraphQL/Client.php b/src/GraphQL/Client.php index 4f1df80..0d7ed6d 100644 --- a/src/GraphQL/Client.php +++ b/src/GraphQL/Client.php @@ -37,6 +37,12 @@ public function __construct(array $httpConfig = []) $this->request = new Request($httpConfig); } + public function setToken(string $token): self + { + $this->token = $token; + return $this; + } + public function login(string $email, string $password): self { $this->token = (new Account($this->request))->login($email, $password);