Class OpencastScalars

java.lang.Object
org.opencastproject.graphql.scalar.OpencastScalars

public final class OpencastScalars extends Object
This class provides custom scalar types for the Opencast GraphQL API. Scalar types are primitive data types that GraphQL uses to validate and serialize data. In this case, a custom scalar type for Duration is provided.
  • Field Details

    • Duration

      public static final graphql.schema.GraphQLScalarType Duration
      An ISO 8601 compliant duration scalar that accepts string values like `PT1H30M10S` and produces `java.time.Duration` objects at runtime.

      Its Coercing.serialize(java.lang.Object) and Coercing.parseValue(java.lang.Object) methods accept OffsetDateTime, ZoneDateTime and formatted Strings as valid objects.

      See Also: