An agent could be defined like so:
mutation {
defineContractorAgent(
externalId: "externalId",
attributes: { locationAttribute: "location" }
) {
context
}
}
A user could query that agent in the following way:
query {
agentById(id: {externalId: "externalid" }) {
... on ContractorAgent {
id
externalId
locationAttribute
}
}
}