You should be able to do this:
addA(input: [{
name: "some name"
relation: {
name: ""
}
}]) {
numUids
}
In essence, you need to construct a valid GraphQL object of type B for relation field in type A while adding object of type A.