GraphQL - Mutations
You need to delete several posts by their IDs in a single GraphQL mutation. Which mutation design is most appropriate?
You need to delete several posts by their IDs in a single GraphQL mutation. Which mutation design is most appropriate?
postIds. mutation { deletePost(postId: "101") { success } deletePost(postId: "102") { success } } calls multiple mutations separately, which is inefficient. mutation { deletePosts(ids: "101,102,103") { success } } passes a single string instead of a list. mutation { deletePosts(postId: "101") { success } } passes only one ID.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions