Turn javascript objects into a relay mutation input friendly string.
import mutationify from 'graphql-relay-mutationify';
mutationify({
firstName: 'Mick',
lastName: 'Hansen',
count: 30
}); // {firstName: "Mick", lastName: "Hansen", count: 30}
import mutationify from 'graphql-relay-mutationify';
let input = {
firstName: 'Mick',
lastName: 'Hansen',
count: 30
};
let query = `
mutation {
updateProfile(input: {profile: ${mutationify(input)}}) {
profile
}
}
`;