Is it possible to pass an object into a graphQL mutation as variables?
let salesDate = {
company_id: "abcd",
source: "tally",
data: {
value: "02",
date: "2016-17-01"
}
};
const mutation = gql`
mutation addData($data: Object){
addData(data: $data){
data
}
}
`;
This is not working and I don't see any way to define an object as a parameter type.