@valueflows/vf-graphql
Version:
Reference GraphQL implementation of the ValueFlows spec
153 lines (114 loc) • 3.13 kB
JavaScript
// Generated by scripts/build.js - edit the *.gql file instead!
module.exports = `
##
#
# Measurement module
#
# Typedefs used for defining and representing measurements
# in the real (physical) world.
#
# @package vf-graphql
# @since 2019-02-11
#
##
"""
Defines the unit of time measured in a temporal \`Duration\`.
"""
enum TimeUnit {
year, month, week, day, hour, minute, second
}
"""
A \`Duration\` represents an interval between two \`DateTime\` values.
"""
type Duration {
"A number representing the duration, will be paired with a unit."
numericDuration: Decimal!
"A unit of measure."
unitType: TimeUnit!
}
"""
Mutation input structure for defining time durations.
"""
input IDuration {
"A number representing the duration, will be paired with a unit."
numericDuration: Decimal!
"A unit of measure."
unitType: TimeUnit!
}
"""
Defines a unit of measurement, along with its display symbol.
From OM2 vocabulary.
"""
type Unit {
id: ID!
revisionId: ID!
"A human readable label for the unit, can be language specific."
label: String!
"A standard display symbol for a unit of measure."
symbol: String!
"The OM2 identifier for the unit."
omUnitIdentifier: String!
"Arbitrary classification for the unit."
classifiedAs: String
}
"""
Semantic meaning for measurements: binds a quantity to its measurement unit.
See http://www.qudt.org/pages/QUDToverviewPage.html
"""
type Measure {
"A number representing the quantity, will be paired with a unit."
hasNumericalValue: Decimal!
"A unit of measure."
hasUnit: Unit
}
"""
Mutation input structure for defining measurements. Should be nulled if not present, rather than empty.
"""
input IMeasure {
"A number representing the quantity, will be paired with a unit."
hasNumericalValue: Decimal!
"(\`Unit\`) A unit of measure."
hasUnit: ID
}
input UnitCreateParams {
"A human readable label for the unit, can be language specific."
label: String!
"A standard display symbol for a unit of measure."
symbol: String!
"The OM2 identifier for the unit."
omUnitIdentifier: String!
"References one or more concepts in a common taxonomy or other classification scheme for purposes of categorization or grouping."
classifiedAs: [URI!]
}
input UnitUpdateParams {
revisionId: ID!
"A human readable label for the unit, can be language specific."
label: String
"A standard display symbol for a unit of measure."
symbol: String
"The OM2 identifier for the unit."
omUnitIdentifier: String
"References one or more concepts in a common taxonomy or other classification scheme for purposes of categorization or grouping."
classifiedAs: [URI!]
}
type UnitResponse {
unit: Unit!
}
type UnitConnection {
edges: [UnitEdge!]!
pageInfo: PageInfo!
}
type UnitEdge {
node: Unit!
cursor: String!
}
type Query {
unit(id: ID!): Unit
units(first: Int, after: String, last: Int, before: String): UnitConnection!
}
type Mutation {
createUnit(unit: UnitCreateParams!): UnitResponse!
updateUnit(unit: UnitUpdateParams!): UnitResponse!
deleteUnit(revisionId: ID!): Boolean!
}
`