Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "updatePath"
- query
- :
- "mutation updatePath($path: String!) {↵ UpdatePath(path: $path) {↵ Id↵ name↵ __typename↵ }↵}↵"
- const PathsMutation = new GraphQLObjectType({
- name: 'Mutation',
- fields: () => ({
- UpdatePath: {
- type: PathType,
- args: {
- Id: { type: GraphQLString }
- },
- resolve: function (_, { path }) {
- console.log(`Updating path: ${path}`);
- return new Promise((resolve, reject) => {
- resolve(path);
- });
- }
- }
- })
- });
Add Comment
Please, Sign In to add comment