graphql.execution.values.legacycoercing.LegacyCoercingInputInterceptor Maven / Gradle / Ivy
package graphql.execution.values.legacycoercing;
import graphql.GraphQLContext;
import graphql.Scalars;
import graphql.execution.values.InputInterceptor;
import graphql.scalar.CoercingUtil;
import graphql.schema.GraphQLInputType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.math.BigDecimal;
import java.util.Locale;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import static graphql.Assert.assertNotNull;
import static graphql.scalar.CoercingUtil.isNumberIsh;
public class LegacyCoercingInputInterceptor implements InputInterceptor {
/**
* This will ONLY observe legacy values and invoke the callback when it gets one. you can use this to enumerate how many
* legacy values are hitting you graphql implementation
*
* @param observerCallback a callback allowing you to observe a legacy scalar value
*
* @return an InputInterceptor that only observes values
*/
public static LegacyCoercingInputInterceptor observesValues(BiConsumer
© 2015 - 2024 Weber Informatics LLC | Privacy Policy