Class OpencastScalars
java.lang.Object
org.opencastproject.graphql.scalar.OpencastScalars
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final graphql.schema.GraphQLScalarTypeAn ISO 8601 compliant duration scalar that accepts string values like `PT1H30M10S` and produces `java.time.Duration` objects at runtime. -
Method Summary
-
Field Details
-
Duration
public static final graphql.schema.GraphQLScalarType DurationAn 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)andCoercing.parseValue(java.lang.Object)methods accept OffsetDateTime, ZoneDateTime and formatted Strings as valid objects.- See Also:
-