diff --git a/src/Bridge/TestCaseTrait.php b/src/Bridge/TestCaseTrait.php index c1b7ccf..5743ed8 100644 --- a/src/Bridge/TestCaseTrait.php +++ b/src/Bridge/TestCaseTrait.php @@ -13,6 +13,8 @@ trait TestCaseTrait { protected static $endpoint = '/graphql'; + + protected static $method = 'POST'; /** * @var array @@ -22,7 +24,7 @@ trait TestCaseTrait public function query(QueryInterface $query, array $files = [], array $headers = [], array $cookies = []) { return $this->call( - 'POST', + static::$method, static::$endpoint, ['query' => $query()], $cookies, @@ -34,7 +36,7 @@ public function query(QueryInterface $query, array $files = [], array $headers = public function mutation(MutationInterface $mutation, array $files = [], array $headers = [], array $cookies = []) { return $this->call( - 'POST', + static::$method, static::$endpoint, ['query' => $mutation()], $cookies,