Skip to content

Amendments

List amendments

All amendments can be queried using the allocation query.

query allocation {
allocation(id: "4RwHQ1bQsmA5v4tjf5o0m6") {
amendments {
id
state
value
units
unitCost
accepted
}
}
}

Get current amendment

The current amendment is queried using the allocation query and the currentAmendment field.

query allocation {
allocation(id: "4RwHQ1bQsmA5v4tjf5o0m6") {
currentAmendment {
id
state
value
units
unitCost
accepted
}
}
}

Create amendment

An amendment can be created using the createamendment mutation to alter certain fields in the allocation.

mutation amendmentCreate {
amendmentCreate(allocationId: "36CHoZ4TqyeL8qdHvcbMq4", input: {
value: 9000
comment: "This is a comment"
}) {
id
state
}
}

Accept amendment

An amendment needs to be accepted before it is applied to an allocation. Once accepted the fields in the allocation will reflect the amended data.

mutation amendmentAccept {
amendmentAccept(allocationId: "36CHoZ4TqyeL8qdHvcbMq4") {
id
state
}
}

Cancel amendment

If an amendment is no longer needed it can be cancelled.

mutation amendmentCancel {
amendmentCancel(allocationId: "36CHoZ4TqyeL8qdHvcbMq4", comment: "Reason for cancellation") {
id
state
}
}