From 47458111147066fa48a8fb80bbbc11e6804721c6 Mon Sep 17 00:00:00 2001 From: syedmouaazfarrukh Date: Thu, 19 Jan 2023 08:50:07 -0800 Subject: [PATCH] Adding content to 102-mutations --- .../content/102-mutations/100-what-are-mutations.md | 11 ++++++++++- .../102-mutations/101-multiple-mutation-fields.md | 10 +++++++++- .../content/102-mutations/102-operation-name.md | 9 ++++++++- src/roadmaps/graphql/content/102-mutations/index.md | 11 ++++++++++- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/roadmaps/graphql/content/102-mutations/100-what-are-mutations.md b/src/roadmaps/graphql/content/102-mutations/100-what-are-mutations.md index 686d3f342..39c26ded1 100644 --- a/src/roadmaps/graphql/content/102-mutations/100-what-are-mutations.md +++ b/src/roadmaps/graphql/content/102-mutations/100-what-are-mutations.md @@ -1 +1,10 @@ -# What are mutations \ No newline at end of file +# What are Mutations + +In GraphQL, a mutation is a type of query used to make changes to data on the server. It is used to create, update, or delete data, and is structured similarly to a query, but with a "mutation" field at the top level instead of a "query" field. + +A mutation typically includes fields that specify the data to be changed and the operation to be performed (e.g. "create", "update", or "delete"). It can also include arguments to specify the specific data to be affected. + +Learn more from the following resources: + +- [Get started with Mutations](https://graphql.org/learn/queries/#mutations) +- [What is a GraphQL Mutation?](https://hasura.io/learn/graphql/intro-graphql/graphql-mutations/) \ No newline at end of file diff --git a/src/roadmaps/graphql/content/102-mutations/101-multiple-mutation-fields.md b/src/roadmaps/graphql/content/102-mutations/101-multiple-mutation-fields.md index 05cc9a338..54b535200 100644 --- a/src/roadmaps/graphql/content/102-mutations/101-multiple-mutation-fields.md +++ b/src/roadmaps/graphql/content/102-mutations/101-multiple-mutation-fields.md @@ -1 +1,9 @@ -# Multiple mutation fields \ No newline at end of file +# Multiple Mutation Fields + +In GraphQL, it is possible to perform multiple mutations in a single query by including multiple "mutation" fields in the query. This is called "batching" or "chaining" mutations. + +Learn more from the following links: + +- [Guide to Multiple fields in mutations](https://graphql.org/learn/queries/#multiple-fields-in-mutations) +- [Multiple fields in mutations](https://dgraph.io/docs/graphql/mutations/mutations-overview/) +- [Multiple mutations in a single GraphQL request](https://www.ibm.com/docs/en/filenet-p8-platform/5.5.x?topic=mutations-multiple-in-single-graphql-request) \ No newline at end of file diff --git a/src/roadmaps/graphql/content/102-mutations/102-operation-name.md b/src/roadmaps/graphql/content/102-mutations/102-operation-name.md index 67807e90a..ddd64aa9d 100644 --- a/src/roadmaps/graphql/content/102-mutations/102-operation-name.md +++ b/src/roadmaps/graphql/content/102-mutations/102-operation-name.md @@ -1 +1,8 @@ -# Operation name \ No newline at end of file +# Operation Name + +In GraphQL, an operation name is an optional identifier that can be used to uniquely identify a query or a mutation in a document containing multiple operations. It can be used to provide more meaningful names for operations, making it easier to understand the purpose of the operation and to identify it in the event of an error. + +Learn more from the following resources: + +- [Intro to Operation Name](https://graphql.org/learn/queries/#operation-name) +- [How to Use GraphQL Operation Names](https://www.shopify.com/partners/blog/graphql-operation-names-and-variables) \ No newline at end of file diff --git a/src/roadmaps/graphql/content/102-mutations/index.md b/src/roadmaps/graphql/content/102-mutations/index.md index 520d34a37..13cfc84e2 100644 --- a/src/roadmaps/graphql/content/102-mutations/index.md +++ b/src/roadmaps/graphql/content/102-mutations/index.md @@ -1 +1,10 @@ -# Mutations \ No newline at end of file +# Mutations + +In GraphQL, a mutation is a type of query used to make changes to the data on the server, such as creating, updating, or deleting data. A mutation is structured similarly to a query, but with a "mutation" field at the top level instead of a "query" field. + +The mutation includes fields that specify the data to be changed, the operation to be performed (create, update or delete) and also can include arguments to specify the specific data to be affected. + +To learn more, visit the following links: + +- [Getting started with Mutations](https://graphql.org/learn/queries/#mutations) +- [Tutorial - Mutations in GraphQL](https://www.youtube.com/watch?v=DU77lbBPfBI) \ No newline at end of file