Skip to content

Commit

Permalink
Fix code example on search method.
Browse files Browse the repository at this point in the history
Character is interface without properties, so to access `name` and
`surname` we use `getName()` and `getSurname()` methods.
  • Loading branch information
rakhmad committed Sep 23, 2022
1 parent abc8ccd commit df6284d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/smallrye-graphql.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,8 @@ Update `GalaxyService` to provide search:
.collect(Collectors.toList());
results.addAll(matchingFilms);
List<Character> matchingCharacters = getAllCharacters().stream()
.filter(character -> character.name.contains(query)
|| character.surname.contains(query))
.filter(character -> character.getName().contains(query)
|| character.getSurname().contains(query))
.collect(Collectors.toList());
results.addAll(matchingCharacters);
return results;
Expand Down

0 comments on commit df6284d

Please sign in to comment.