@valueflows/vf-graphql
Version:
Reference GraphQL implementation of the ValueFlows spec
299 lines (217 loc) • 10.8 kB
JavaScript
// Generated by scripts/build.js - edit the *.gql file instead!
module.exports = `
##
#
# Observation module
#
# Record of what actually happened affecting the economic ecosystem.
#
# @depends action.gql
# @depends measurement.gql
# @package vf-graphql
# @since 2019-02-11
#
##
union TrackTraceItem = EconomicResource | EconomicEvent
union ProductionFlowItem = EconomicResource
"""
An observed economic flow, as opposed to a flow planned to happen in the future. This could reflect a change in the quantity of an economic resource. It is also defined by its behavior in relation to the economic resource (see \`Action\`)
"""
type EconomicEvent {
id: ID!
revisionId: ID!
"Relates an economic event to a verb, such as consume, produce, work, improve, etc."
action: Action!
"Economic resource involved in the economic event."
resourceInventoriedAs: EconomicResource
"Additional economic resource on the economic event when needed by the receiver. Used when a transfer or move, or sometimes other actions, requires explicitly identifying an economic resource on the receiving side."
toResourceInventoriedAs: EconomicResource
"References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping."
resourceClassifiedAs: [URI!]
"The amount and unit of the economic resource counted or inventoried. This is the quantity that could be used to increment or decrement a resource, depending on the type of resource and resource effect of action."
resourceQuantity: Measure
"The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness."
effortQuantity: Measure
"The beginning of the economic event."
hasBeginning: DateTime
"The end of the economic event."
hasEnd: DateTime
"The date/time at which the economic event occurred. Can be used instead of beginning and end."
hasPointInTime: DateTime
"A textual description or comment."
note: String
"Reference to an agreement between agents which specifies the rules or policies or calculations which govern this economic event."
agreedIn: URI
"References another economic event that implied this economic event, often based on a prior agreement."
triggeredBy: EconomicEvent
"The intent this economic event satisfies."
satisfies: [Intent!]
"The commitment this economic event fulfills."
fulfills: [Commitment!]
"The economic event that this economic event corrects."
corrects: EconomicEvent
"The economic event can be safely deleted, has no dependent information."
deletable: Boolean
# inverse relationships and queries
"Other EconomicEvents which have been triggered by this one."
triggers: [EconomicEvent!]
previous: [ProductionFlowItem!]
next: [ProductionFlowItem!]
track: [TrackTraceItem!]
trace: [TrackTraceItem!]
}
"""
A resource which is useful to people or the ecosystem.
"""
type EconomicResource {
id: ID!
revisionId: ID!
"An informal or formal textual identifier for an item. Does not imply uniqueness."
name: String
"References one or more concepts in a common taxonomy or other classification scheme for purposes of categorization or grouping."
classifiedAs: [URI!]
"Sometimes called serial number, used when each item must have a traceable identifier (like a computer). Could also be used for other unique tracking identifiers needed for resources."
trackingIdentifier: String
"The uri to an image relevant to the resource, such as a photo, diagram, etc."
image: URI
"URI addresses to images relevant to the resource."
imageList: [URI!]
"The current amount and unit of the economic resource for which the agent has primary rights and responsibilities, sometimes thought of as ownership. This can be either stored or derived from economic events affecting the resource."
accountingQuantity: Measure
"The current amount and unit of the economic resource which is under direct control of the agent. It may be more or less than the accounting quantity. This can be either stored or derived from economic events affecting the resource."
onhandQuantity: Measure
"A textual description or comment."
note: String
"The unit used for use or work or cite actions for this resource."
unitOfEffort: Unit
"The state of the desired economic resource (pass or fail), after coming out of a test or review process. Can be derived from the last event if a pass or fail event."
state: Action
"Used when a stock economic resource contains items also defined as economic resources."
containedIn: EconomicResource
##############################################################################
# inverse relationships and queries
"Used when a stock economic resource contains units also defined as economic resources."
contains: [EconomicResource!]
"All economic events with the economic resource in the resourceInventoriedAs, including all process related events, the provider resource in transfers/moves, and raise/lower."
economicEventsInOutFrom(first: Int, after: String, last: Int, before: String): EconomicEventConnection
"All economic events with the economic Resource in the toResourceInventoriedAs, which is the receiver resource in transfers and moves."
economicEventsTo(first: Int, after: String, last: Int, before: String): EconomicEventConnection
previous: [EconomicEvent!]
next: [EconomicEvent!]
track: [TrackTraceItem!]
trace: [TrackTraceItem!]
}
input EconomicEventCreateParams {
"(\`Action\`) Relates an economic event to a verb, such as consume, produce, work, improve, etc."
action: ID!
"(\`EconomicResource\`) Economic resource involved in the economic event."
resourceInventoriedAs: ID
"References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping."
resourceClassifiedAs: [URI!]
"The amount and unit of the economic resource counted or inventoried. This is the quantity that could be used to increment or decrement a resource, depending on the type of resource and resource effect of action."
resourceQuantity: IMeasure
"The amount and unit of the work or use or citation effort-based action. This is often a time duration, but also could be cycle counts or other measures of effort or usefulness."
effortQuantity: IMeasure
"The beginning of the economic event."
hasBeginning: DateTime
"The end of the economic event."
hasEnd: DateTime
"The date/time at which the economic event occurred. Can be used instead of beginning and end."
hasPointInTime: DateTime
"A textual description or comment."
note: String
"Reference to an agreement between agents which specifies the rules or policies or calculations which govern this economic event."
agreedIn: URI
"(\`EconomicEvent\`) References another economic event that implied this economic event, often based on a prior agreement."
triggeredBy: ID
"(\`EconomicResource\`) Additional economic resource on the economic event when needed by the receiver. Used when a transfer or move, or sometimes other actions, requires explicitly identifying an economic resource on the receiving side."
toResourceInventoriedAs: ID
"The intent this economic event satisfies."
satisfies: [ID!]
"The commitment this economic event fulfills."
fulfills: [ID!]
}
input EconomicEventUpdateParams {
revisionId: ID!
"A textual description or comment."
note: String
"Reference to an agreement between agents which specifies the rules or policies or calculations which govern this economic event."
agreedIn: URI
"(\`EconomicEvent\`) References another economic event that implied this economic event, often based on a prior agreement."
triggeredBy: ID
}
type EconomicEventResponse {
"Details of the newly created event."
economicEvent: EconomicEvent!
"Details of any newly created \`EconomicResource\`, for events that create new resources."
economicResource: EconomicResource
}
"""
Input \`EconomicResource\` type used when sending events to setup initial resource recordings
"""
input EconomicResourceCreateParams {
"An informal or formal textual identifier for an item. Does not imply uniqueness."
name: String
"Sometimes called serial number, used when each item must have a traceable identifier (like a computer). Could also be used for other unique tracking identifiers needed for resources."
trackingIdentifier: String
"The uri to an image relevant to the resource, such as a photo, diagram, etc."
image: URI
"URI addresses to images relevant to the resource."
imageList: [URI!]
"(\`EconomicResource\`) Used when a stock economic resource contains items also defined as economic resources."
containedIn: ID
"A textual description or comment."
note: String
}
input EconomicResourceUpdateParams {
revisionId: ID!
"References one or more concepts in a common taxonomy or other classification scheme for purposes of categorization or grouping."
classifiedAs: [URI!]
"The uri to an image relevant to the resource, such as a photo, diagram, etc."
image: URI
"URI addresses to images relevant to the resource."
imageList: [URI!]
"(\`EconomicResource\`) Used when a stock economic resource contains items also defined as economic resources."
containedIn: ID
"(\`Unit\`) The unit used for use or work or cite actions for this resource."
unitOfEffort: ID
"A textual description or comment."
note: String
}
type EconomicResourceResponse {
economicResource: EconomicResource!
}
type EconomicEventConnection {
edges: [EconomicEventEdge!]!
pageInfo: PageInfo!
}
type EconomicEventEdge {
node: EconomicEvent!
cursor: String!
}
type EconomicResourceConnection {
edges: [EconomicResourceEdge!]!
pageInfo: PageInfo!
}
type EconomicResourceEdge {
node: EconomicResource!
cursor: String!
}
type Query {
economicEvent(id: ID!): EconomicEvent
economicEvents(first: Int, after: String, last: Int, before: String): EconomicEventConnection!
economicResource(id: ID!): EconomicResource
economicResources(first: Int, after: String, last: Int, before: String): EconomicResourceConnection!
}
type Mutation {
"Registers a new (\`EconomicEvent\`) with the collaboration space. Also serves as a means to register (\`EconomicResource\`) as well, instead of createEconomicResource"
createEconomicEvent(
event: EconomicEventCreateParams!
newInventoriedResource: EconomicResourceCreateParams
): EconomicEventResponse!
updateEconomicEvent(event: EconomicEventUpdateParams!): EconomicEventResponse!
updateEconomicResource(
resource: EconomicResourceUpdateParams!
): EconomicResourceResponse!
}
`