Ocelot-Social/webapp/graphql/AddPostComments.js
Matt Rider dd9383ef40 Create two custom resolvers, get working with front end
- Had difficulty adding a relationship with one custom resolver, if id for comment was not passed in, the comment was not created, hard coding it in also wasn't a good solution
2019-04-16 23:12:13 -03:00

19 lines
332 B
JavaScript

import gql from 'graphql-tag'
export default app => {
return {
AddPostComments: gql(`
mutation($from: _CommentInput!, $to: _PostInput!) {
AddPostComments(from: $from, to: $to) {
from {
id
}
to {
id
}
}
}
`)
}
}