Skip to content

Commit 87cefed

Browse files
authored
Merge pull request #167 from joshcanfield/master
Make interface default methods available as field resolver methods.
2 parents b864c4b + e8620a4 commit 87cefed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/com/coxautodev/graphql/tools/FieldResolverScanner.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ internal class FieldResolverScanner(val options: SchemaParserOptions) {
2121
private val log = LoggerFactory.getLogger(FieldResolverScanner::class.java)
2222

2323
fun getAllMethods(type: Class<*>) =
24-
type.declaredMethods.toList().filter { !it.isSynthetic } + ClassUtils.getAllSuperclasses(type)
25-
.flatMap { it.declaredMethods.toList() }
24+
(type.methods.toList() + ClassUtils.getAllSuperclasses(type).flatMap { it.methods.toList() })
25+
.filter { !it.isSynthetic }
2626
.filter { !Modifier.isPrivate(it.modifiers) }
2727
// discard any methods that are coming off the root of the class hierarchy
2828
// to avoid issues with duplicate method declarations

0 commit comments

Comments
 (0)