Class AbstractHelper

java.lang.Object
io.smallrye.graphql.execution.datafetcher.helper.AbstractHelper
Direct Known Subclasses:
ArgumentHelper, FieldHelper

public abstract class AbstractHelper extends Object
Help with the fields when fetching data.
Author:
Phillip Kruger (phillip.kruger@redhat.com)
  • Field Details

  • Constructor Details

    • AbstractHelper

      protected AbstractHelper()
  • Method Details

    • shouldTransform

      protected boolean shouldTransform(Field field)
      Checks, if this field is a scalar and the object has the wrong type. Transformation is only possible for scalars and only needed if types don't match.
      Parameters:
      field - the field
      Returns:
      if transformation is needed
    • shouldAdapt

      protected boolean shouldAdapt(Field field)
      Checks if we should adapt the field This is (for now) only applying to AdaptWith
      Parameters:
      field - the field
      Returns:
      if adaption is needed
    • shouldAutoAdaptWithMap

      protected boolean shouldAutoAdaptWithMap(Field field)
    • shouldAdaptWith

      protected boolean shouldAdaptWith(Field field)
    • shouldAdaptTo

      protected boolean shouldAdaptTo(Field field)
    • transformOrAdapt

      public Object transformOrAdapt(Object val, Field field, graphql.schema.DataFetchingEnvironment dfe) throws AbstractDataFetcherException
      Throws:
      AbstractDataFetcherException
    • getArrayType

      protected Class<?> getArrayType(Field field)
    • getTransformer

      protected Transformer getTransformer(Field field)
    • getReflectionInvokerForInput

      protected ReflectionInvoker getReflectionInvokerForInput(AdaptWith adaptWith)
    • getReflectionInvokerForOutput

      protected ReflectionInvoker getReflectionInvokerForOutput(AdaptWith adaptWith)