use of graphql.schema.idl.errors.MissingScalarImplementationError in project graphql-java by graphql-java.
the class SchemaTypeChecker method checkScalarImplementationsArePresent.
private void checkScalarImplementationsArePresent(List<GraphQLError> errors, TypeDefinitionRegistry typeRegistry, RuntimeWiring wiring) {
typeRegistry.scalars().forEach((scalarName, scalarTypeDefinition) -> {
WiringFactory wiringFactory = wiring.getWiringFactory();
ScalarWiringEnvironment environment = new ScalarWiringEnvironment(typeRegistry, scalarTypeDefinition, Collections.emptyList());
if (!wiringFactory.providesScalar(environment) && !wiring.getScalars().containsKey(scalarName)) {
errors.add(new MissingScalarImplementationError(scalarName));
}
});
}
Aggregations