, , .
mutation {
updateProduct(id: 1, name: "Foo") {
id
}
}
, , . , , - :
resolve({ id }, { user }) {
authorize(user, 'project', Product.find(id).project)
...
}
:
, , .
, , , , .
updateProduct:
mutation {
updateProduct(projectId: 1, id: 1, name: "Foo") {
id
}
}
.
, , , , . , resolve , . , , , - , , .
, ( ), , , : , , . , , ( , ).
source
share