You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constMutation=newGraphQLObjectType({name: "BlogMutations",description: "Mutations of our blog",fields: ()=>({createPost: {type: Post,args: {title: {type: newGraphQLNonNull(GraphQLString)},content: {type: newGraphQLNonNull(GraphQLString)}},resolve: function(source,args){letpost=Object.assign({},args);// Generate the _idpost._id=`${Date.now()}::${Math.ceil(Math.random()*9999999)}`;// Assign a userpost.author="arunoda";// Add the Post to the data storePostsList.push(post);// return the new post.returnpost;}}})});
I think this could work on apollo as well
The text was updated successfully, but these errors were encountered:
Example of raw graphql mutation based on https://learngraphql.com/basics/defining-mutations/2
I think this could work on apollo as well
The text was updated successfully, but these errors were encountered: