-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(graphql)!:
AstManipulator
more methods, deprecated methods…
… removal and fixes.
- Loading branch information
Showing
15 changed files
with
1,280 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/graphql/src/Exceptions/ArgumentAlreadyDefined.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace LastDragon_ru\LaraASP\GraphQL\Exceptions; | ||
|
||
use Stringable; | ||
use Throwable; | ||
|
||
use function sprintf; | ||
|
||
class ArgumentAlreadyDefined extends AstException { | ||
public function __construct( | ||
protected Stringable|string $source, | ||
Throwable $previous = null, | ||
) { | ||
parent::__construct( | ||
sprintf( | ||
'Argument `%s` already defined.', | ||
$this->source, | ||
), | ||
$previous, | ||
); | ||
} | ||
|
||
public function getSource(): Stringable|string { | ||
return $this->source; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace LastDragon_ru\LaraASP\GraphQL\Exceptions; | ||
|
||
use Stringable; | ||
use Throwable; | ||
|
||
use function sprintf; | ||
|
||
class TypeUnexpected extends AstException { | ||
public function __construct( | ||
protected Stringable|string $source, | ||
protected Stringable|string $expected, | ||
Throwable $previous = null, | ||
) { | ||
parent::__construct( | ||
sprintf( | ||
'Type `%s` is not a `%s`.', | ||
$this->source, | ||
$this->expected, | ||
), | ||
$previous, | ||
); | ||
} | ||
|
||
public function getSource(): Stringable|string { | ||
return $this->source; | ||
} | ||
|
||
public function getExpected(): Stringable|string { | ||
return $this->expected; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.