Compare commits

..

3 Commits

Author SHA1 Message Date
Your Name a4ea1f6a4a Naming adjusted for consistency 2021-07-29 01:29:38 +02:00
Your Name 9a60bf1659 Auth 2021-07-28 21:59:31 +02:00
Your Name 17a994f0d5 Mutations 2021-07-28 19:11:00 +02:00
@@ -1,6 +1,6 @@
<?php namespace GermanAirlinesVa\Fleet\Classes; <?php namespace GermanAirlinesVa\Fleet\Classes;
use GermanAirlinesVa\Fleet\Models\Aircraft as Model; use GermanAirlinesVa\Fleet\Models\Aircraft;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use GraphQL\Type\Definition\ResolveInfo; use GraphQL\Type\Definition\ResolveInfo;
@@ -8,7 +8,7 @@ use Nuwave\Lighthouse\Subscriptions\Subscriber;
use Nuwave\Lighthouse\Schema\Types\GraphQLSubscription; use Nuwave\Lighthouse\Schema\Types\GraphQLSubscription;
use Nuwave\Lighthouse\Support\Contracts\GraphQLContext; use Nuwave\Lighthouse\Support\Contracts\GraphQLContext;
class Aircraft extends GraphQLSubscription class AircraftAdded extends GraphQLSubscription
{ {
/** /**
* Check if subscriber is allowed to listen to the subscription. * Check if subscriber is allowed to listen to the subscription.
@@ -68,12 +68,8 @@ class Aircraft extends GraphQLSubscription
* @param \GraphQL\Type\Definition\ResolveInfo $resolveInfo * @param \GraphQL\Type\Definition\ResolveInfo $resolveInfo
* @return mixed * @return mixed
*/ */
public function resolve($root, array $args, GraphQLContext $context, ResolveInfo $resolveInfo): array public function resolve($root, array $args, GraphQLContext $context, ResolveInfo $resolveInfo): Aircraft
{ {
// Optionally manipulate the `$root` item before it gets broadcasted to return $root;
// subscribed client(s).
//$root->load();
return array($root);
} }
} }