Bytes convertImpl(final Object input) {
          if (input instanceof Bytes bytes) {
            return bytes;
          } else if (input instanceof StringValue stringValue) {
            return convertImpl(stringValue.getValue());
          } else if (input instanceof String string) {
            if (!Quantity.isValid(string)) {
              throw new CoercingParseLiteralException(
                  "Bytes value '" + input + "' is not prefixed with 0x");
            }
            try {
              return Bytes.fromHexStringLenient((String) input);
            } catch (IllegalArgumentException iae) {
              return null;
            }
          } else {
            return null;
          }
        }
The Scalars class provides methods for creating GraphQLScalarType objects. These objects
represent the scalar types used in GraphQL, such as Address, BigInt, Bytes, Bytes32, and Long.
Each method in this class returns a GraphQLScalarType object that has been configured with a
specific Coercing implementation. The Coercing implementation defines how that type is
serialized, deserialized and validated.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/graphql/internal/Scalars.java