I am seeing this error:
Uncaught RelayNetwork: No data returned for operation
in my application. I am using Relay Modern with "relay-runtime": "1.7.0"
The question i am having is how to catch these errors. I feel no matter where i place my try/catch, this error keeps eluding me.
e.g.
const mutation = graphql`
mutation MyMutation($input: UpdateMe!) {
updateSomething(input: $input) {
article {
...things_stuff
}
}
}
`;
export default ({
rowId,
...patch
}: Patch): Promise<GreatTypes> =>
new Promise((resolve, reject) => {
commitMutation(environment, {
mutation,
variables: {
id,
},
onCompleted: (resp, err) => {
if (err) {
console.log('onCompleted @ sdfg');
return reject(err);
}
return resolve(resp);
},
onError: err => {
console.log('onError @ sdfg');
return reject(err);
},
});
});