@valueflows/vf-graphql
Version:
Reference GraphQL implementation of the ValueFlows spec
143 lines (107 loc) • 3.98 kB
JavaScript
// Generated by scripts/build.js - edit the *.gql file instead!
module.exports = `
##
#
# ResourceSpecification module
#
# Provides functionality for classifying and organising EconomicResources.
#
# @depends measurement.gql
# @package vf-graphql
# @since 2022-05-27
#
##
"""
Specification of a kind of resource. Could define a material item, service, digital item, currency account, etc.
Used instead of a classification when more information is needed, particularly for recipes.
"""
type ResourceSpecification {
id: ID!
revisionId: ID!
"An informal or formal textual identifier for a type of resource. Does not imply uniqueness."
name: String!
"The uri to an image relevant to the entity, such as a photo, diagram, etc."
image: URI
"URI addresses to images relevant to the type of resource."
imageList: [URI!]
"References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping."
resourceClassifiedAs: [URI!]
"A textual description or comment."
note: String
"The default unit used for the resource itself."
defaultUnitOfResource: Unit
"The default unit used for use or work."
defaultUnitOfEffort: Unit
"Defines if any resource of that type can be freely substituted for any other resource of that type when used, consumed, traded, etc."
substitutable: Boolean
}
##
# API input and output types
##
input ResourceSpecificationCreateParams {
"An informal or formal textual identifier for a type of resource. Does not imply uniqueness."
name: String!
"The uri to an image relevant to the entity, such as a photo, diagram, etc."
image: URI
"URI addresses to images relevant to the type of resource."
imageList: [URI!]
"References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping."
resourceClassifiedAs: [URI!]
"A textual description or comment."
note: String
"(\`Unit\`) The default unit used for the resource itself."
defaultUnitOfResource: ID
"(\`Unit\`) The default unit used for use or work."
defaultUnitOfEffort: ID
"Defines if any resource of that type can be freely substituted for any other resource of that type when used, consumed, traded, etc."
substitutable: Boolean
}
input ResourceSpecificationUpdateParams {
revisionId: ID!
"An informal or formal textual identifier for a type of resource. Does not imply uniqueness."
name: String
"The uri to an image relevant to the entity, such as a photo, diagram, etc."
image: URI
"URI addresses to images relevant to the type of resource."
imageList: [URI!]
"References a concept in a common taxonomy or other classification scheme for purposes of categorization or grouping."
resourceClassifiedAs: [URI!]
"A textual description or comment."
note: String
"(\`Unit\`) The default unit used for the resource itself."
defaultUnitOfResource: ID
"(\`Unit\`) The default unit used for use or work."
defaultUnitOfEffort: ID
"Defines if any resource of that type can be freely substituted for any other resource of that type when used, consumed, traded, etc."
substitutable: Boolean
}
type ResourceSpecificationResponse {
resourceSpecification: ResourceSpecification!
}
type ResourceSpecificationConnection {
edges: [ResourceSpecificationEdge!]!
pageInfo: PageInfo!
}
type ResourceSpecificationEdge {
node: ResourceSpecification!
cursor: String!
}
type Query {
resourceSpecification(id: ID!): ResourceSpecification
resourceSpecifications(
first: Int
after: String
last: Int
before: String
): ResourceSpecificationConnection!
}
type Mutation {
createResourceSpecification(
resourceSpecification: ResourceSpecificationCreateParams!
): ResourceSpecificationResponse!
updateResourceSpecification(
resourceSpecification: ResourceSpecificationUpdateParams!
): ResourceSpecificationResponse!
deleteResourceSpecification(revisionId: ID!): Boolean!
}
`