Skip to content

Commit 0bab35d

Browse files
author
Dariusz Kuc
authored
[generator] mark default PropertyDataFetcher as "trivial" (#1359)
* [generator] mark default PropertyDataFetcher as "trivial" Various instrumentations (e.g. tracing) rely on `TrivialDataFetcher` distinction to skip their execution. Looks like we missed this when creating this data fetcher. * remove redundant implements
1 parent 15c45dd commit 0bab35d

File tree

1 file changed

+3
-2
lines changed
  • generator/graphql-kotlin-schema-generator/src/main/kotlin/com/expediagroup/graphql/generator/execution

1 file changed

+3
-2
lines changed

generator/graphql-kotlin-schema-generator/src/main/kotlin/com/expediagroup/graphql/generator/execution/PropertyDataFetcher.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021 Expedia, Inc
2+
* Copyright 2022 Expedia, Inc
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
1616

1717
package com.expediagroup.graphql.generator.execution
1818

19+
import graphql.TrivialDataFetcher
1920
import graphql.schema.DataFetcher
2021
import graphql.schema.DataFetchingEnvironment
2122
import kotlin.reflect.KProperty
@@ -25,7 +26,7 @@ import kotlin.reflect.KProperty
2526
*
2627
* @param propertyGetter Kotlin property getter that will be invoked to resolve a field
2728
*/
28-
class PropertyDataFetcher(private val propertyGetter: KProperty.Getter<*>) : DataFetcher<Any?> {
29+
class PropertyDataFetcher(private val propertyGetter: KProperty.Getter<*>) : TrivialDataFetcher<Any?> {
2930

3031
/**
3132
* Invokes target getter function.

0 commit comments

Comments
 (0)