middleware = array_merge( $this->middleware, [ ResolveBindableArgs::class, ], ); } public function getAuthorizationMessage(): string { return $this->response->message() ?? 'Unauthorized'; } /** * @return array */ public function attributes(): array { return [ 'name' => $this->getName(), 'description' => $this->description(), 'baseType' => $this->baseType(), ]; } public function getName(): string { return $this->name; } /** * The arguments of the mutation. * * @return Argument[] */ abstract public function arguments(): array; /** * Convert the rebing type to a GraphQL type. */ public function toType(): Type { return GraphQL::type($this->baseType()->getName()); } /** * The base return type of the mutation. */ public function baseType(): BaseType|BaseUnion|null { return null; } abstract public function description(): string; /** * @param array $args */ abstract public function resolve($root, array $args, $context, ResolveInfo $resolveInfo): mixed; }