Skip to content

Commit

Permalink
Merge pull request #825 from nuwave/nested-mutations-subclassed-relat…
Browse files Browse the repository at this point in the history
…ionships

Make nested mutations work with subclassed relationship types
  • Loading branch information
chrissm79 committed May 31, 2019
2 parents b96fd4a + 9eaeb5e commit a54088f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Avoid growing the memory extensively when doing complex AST manipulation https://github.com/nuwave/lighthouse/pull/768
- Make nested mutations work with subclassed relationship types https://github.com/nuwave/lighthouse/pull/825

### Changed

Expand Down
2 changes: 1 addition & 1 deletion src/Execution/MutationExecutor.php
Expand Up @@ -379,7 +379,7 @@ function ($value, string $key) use ($modelReflection, $relationClass): bool {
return false;
}

return $relationClass === $returnType->getName();
return is_a($returnType->getName(), $relationClass, true);
}
);
}
Expand Down

0 comments on commit a54088f

Please sign in to comment.