Guest User

Untitled

a guest
Mar 22nd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. "updatePath"
  2. query
  3. :
  4. "mutation updatePath($path: String!) {↵ UpdatePath(path: $path) {↵ Id↵ name↵ __typename↵ }↵}↵"
  5.  
  6. const PathsMutation = new GraphQLObjectType({
  7. name: 'Mutation',
  8. fields: () => ({
  9. UpdatePath: {
  10. type: PathType,
  11. args: {
  12. Id: { type: GraphQLString }
  13. },
  14. resolve: function (_, { path }) {
  15. console.log(`Updating path: ${path}`);
  16. return new Promise((resolve, reject) => {
  17. resolve(path);
  18. });
  19. }
  20. }
  21. })
  22. });
Add Comment
Please, Sign In to add comment