Class FetchedValue
java.lang.Object
graphql.execution.FetchedValue
Note: This MAY be returned by
InstrumentationFieldCompleteParameters.getFetchedObject()
and therefore part of the public despite never used in a method signature.-
Constructor Summary
ConstructorsConstructorDescriptionFetchedValue(@Nullable Object fetchedValue, List<GraphQLError> errors, @Nullable Object localContext) -
Method Summary
Modifier and TypeMethodDescription@Nullable Objectstatic @Nullable ObjectgetFetchedValue(@Nullable Object sourceValue) This allows you to get to the underlying fetched value depending on whether the source value is aFetchedValueor not@Nullable Objectstatic @Nullable ObjectgetLocalContext(@Nullable Object sourceValue, @Nullable Object defaultLocalContext) This allows you to get to the local context depending on whether the source value is aFetchedValueor nottoString()
-
Constructor Details
-
FetchedValue
public FetchedValue(@Nullable Object fetchedValue, List<GraphQLError> errors, @Nullable Object localContext)
-
-
Method Details
-
getFetchedValue
This allows you to get to the underlying fetched value depending on whether the source value is aFetchedValueor not- Parameters:
sourceValue- the source value in play- Returns:
- the
getFetchedValue()if its wrapped otherwise the source value itself
-
getLocalContext
public static @Nullable Object getLocalContext(@Nullable Object sourceValue, @Nullable Object defaultLocalContext) This allows you to get to the local context depending on whether the source value is aFetchedValueor not- Parameters:
sourceValue- the source value in playdefaultLocalContext- the default local context to use- Returns:
- the
getFetchedValue()if its wrapped otherwise the default local context
-
getFetchedValue
-
getErrors
-
getLocalContext
-
toString
-