Skip to content

Commit

Permalink
Fix nullable attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-de-wit authored Feb 18, 2021
1 parent c2f9b3d commit 6f5907b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Directives/AttachmentDirective.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function handleField(FieldValue $fieldValue, Closure $next): FieldValue
$previousResolver = $fieldValue->getResolver();

// Wrap around the resolver
$wrappedResolver = function ($root, array $args, GraphQLContext $context, ResolveInfo $info) use ($previousResolver): string {
$wrappedResolver = function ($root, array $args, GraphQLContext $context, ResolveInfo $info) use ($previousResolver): ?string {
// Call the resolver, passing along the resolver arguments
/** @var AttachmentInterface $result */
$result = $previousResolver($root, $args, $context, $info);
Expand Down

0 comments on commit 6f5907b

Please sign in to comment.