Skip to content

Commit

Permalink
[generator] mark default PropertyDataFetcher as "trivial" (ExpediaGro…
Browse files Browse the repository at this point in the history
…up#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
  • Loading branch information
Dariusz Kuc authored Feb 12, 2022
1 parent e11bcd3 commit 6fffead
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021 Expedia, Inc
* Copyright 2022 Expedia, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,7 @@

package com.expediagroup.graphql.generator.execution

import graphql.TrivialDataFetcher
import graphql.schema.DataFetcher
import graphql.schema.DataFetchingEnvironment
import kotlin.reflect.KProperty
Expand All @@ -25,7 +26,7 @@ import kotlin.reflect.KProperty
*
* @param propertyGetter Kotlin property getter that will be invoked to resolve a field
*/
class PropertyDataFetcher(private val propertyGetter: KProperty.Getter<*>) : DataFetcher<Any?> {
class PropertyDataFetcher(private val propertyGetter: KProperty.Getter<*>) : TrivialDataFetcher<Any?> {

/**
* Invokes target getter function.
Expand Down

0 comments on commit 6fffead

Please sign in to comment.