This file contains hidden or 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
| # just a default scalar class for now | |
| scalar _Any @scalar(class: "App\\GraphQL\\Scalars\\Any") | |
| type _Service { | |
| sdl: String | |
| } | |
| extend type Query { | |
| _entities(representations: [_Any!]!): [_Entity]! @field(resolver: "App\\GraphQL\\Queries\\Federation") | |
| _service: _Service! @field(resolver: "App\\GraphQL\\Queries\\Federation") |
This file contains hidden or 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
| <?php | |
| namespace App\GraphQL\Queries; | |
| use App\GraphQL\SchemaPrinter; | |
| use GraphQL\Type\Definition\ResolveInfo; | |
| use Nuwave\Lighthouse\GraphQL; | |
| use Nuwave\Lighthouse\Support\Contracts\GraphQLContext; | |
| /** |
This file contains hidden or 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
| <?php | |
| namespace App\Graphql\Directives; | |
| use Nuwave\Lighthouse\Schema\Directives\BaseDirective; | |
| use Nuwave\Lighthouse\Support\Contracts\DefinedDirective; | |
| /** | |
| * Class KeyDirective | |
| * |
This file contains hidden or 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
| <?php | |
| namespace App\Graphql\Directives; | |
| use Nuwave\Lighthouse\Schema\Directives\FieldDirective; | |
| class KeyDirective extends FieldDirective | |
| { | |
| public function name(): string | |
| { |
This file contains hidden or 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
| <?php | |
| class SchemaPrinter { | |
| /** | |
| * @param Schema $schema | |
| * @param array $options | |
| * | |
| * @return string | |
| */ | |
| public static function printFederatedSchema(Schema $schema, array $options = []): string | |
| { |
This file contains hidden or 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
| version: '3.2' | |
| services: | |
| jenkins: | |
| build: ./jenkins | |
| container_name: jenkins | |
| ports: | |
| - "50000:50000" | |
| expose: | |
| - 8080 | |
| restart: always |
This file contains hidden or 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
| <?php | |
| protected function attemptLogin(Request $request) | |
| { | |
| $guards = array_keys(config('auth.guards')); | |
| $attempts = []; | |
| foreach ($guards as $guard) { | |
| $guardInstance = Auth::guard($guard); |
This file contains hidden or 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
| function foo(?string $val) | |
| { | |
| echo (string) $val; | |
| } | |
| foo('test') | |
| foo(true) | |
| foo(false) | |
| foo(null) |
This file contains hidden or 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
| <?php | |
| // PHP 7.2.10 | |
| $value = "test"; | |
| var_dump( | |
| $value, | |
| in_array($value, [1]), | |
| in_array($value, [true]), | |
| in_array($value, ['true']), |
This file contains hidden or 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
| auth: | |
| build: | |
| context: ./docker/auth | |
| dockerfile: Dockerfile${DOCKERFILE_POSTFIX} | |
| expose: | |
| - 9000 | |
| environment: | |
| - SERVICE_NAME=auth | |
| labels: | |
| - "traefik.enable=true" |