graphql-relay-mutationify
v1.2.2
Published
Turn javascript objects into a relay mutation input friendly string
Downloads
12
Readme
graphql-relay-mutationify
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
}
}
`;