@valueflows/vf-graphql
Version:
Reference GraphQL implementation of the ValueFlows spec
99 lines (78 loc) • 2.15 kB
JavaScript
// Generated by scripts/build.js - edit the *.gql file instead!
module.exports = `
##
#
# ProductBatch module
#
# An extension for Observation that provides the ability to track "lot" fields
# for Economic Resources, which is a standard in enterprise resource management
# and supply chain.
#
# @package vf-graphql
# @since 2022-05-27
#
##
"""
A lot or batch, defining a resource produced at the same time in the same way.
From DataFoodConsortium vocabulary https://datafoodconsortium.gitbook.io/dfc-standard-documentation/.
"""
type ProductBatch {
id: ID!
revisionId: ID!
"The standard unique identifier of the batch."
batchNumber: String!
"Expiration date of the batch, commonly used for food."
expiryDate: DateTime
"Date the batch was produced. Can be derived from the economic event of production."
productionDate: DateTime
}
##
# API input and output types
##
input ProductBatchCreateParams {
"The standard unique identifier of the batch."
batchNumber: String!
"Expiration date of the batch, commonly used for food."
expiryDate: DateTime
"Date the batch was produced. Can be derived from the economic event of production."
productionDate: DateTime
}
input ProductBatchUpdateParams {
revisionId: ID!
"The standard unique identifier of the batch."
batchNumber: String
"Expiration date of the batch, commonly used for food."
expiryDate: DateTime
"Date the batch was produced. Can be derived from the economic event of production."
productionDate: DateTime
}
type ProductBatchResponse {
productBatch: ProductBatch!
}
type ProductBatchConnection {
edges: [ProductBatchEdge!]!
pageInfo: PageInfo!
}
type ProductBatchEdge {
node: ProductBatch!
cursor: String!
}
type Query {
productBatch(id: ID!): ProductBatch
productBatches(
first: Int
after: String
last: Int
before: String
): ProductBatchConnection!
}
type Mutation {
createProductBatch(
productBatch: ProductBatchCreateParams!
): ProductBatchResponse!
updateProductBatch(
productBatch: ProductBatchUpdateParams!
): ProductBatchResponse!
deleteProductBatch(id: ID!): Boolean!
}
`