Skip to content

fix(GraphQL): This PR allow to use __typename in mutation.#7285

Merged
JatinDev543 merged 5 commits intomasterfrom
GRAPHQL-921
Jan 13, 2021
Merged

fix(GraphQL): This PR allow to use __typename in mutation.#7285
JatinDev543 merged 5 commits intomasterfrom
GRAPHQL-921

Conversation

@JatinDev543
Copy link
Copy Markdown
Contributor

@JatinDev543 JatinDev543 commented Jan 12, 2021

Fixes GRAPHQL-921

The first mutation below will now return the "Mutation" type, which previously was giving an error.
Mutation:

mutation {
                       __typename
			addpost1(input: [{title: "Dgraph", numLikes: 92233720 }]) {
				post1 {
					title
					numLikes
				}
			}
		}

`Response:`
      {
                "__typename":"Mutation",
		"addpost1": {
			"post1": [{
				"title": "Dgraph",
				"numLikes": 92233720

			}]
		}
	}

This change is Reviewable

@github-actions github-actions Bot added the area/graphql Issues related to GraphQL support on Dgraph. label Jan 12, 2021
Copy link
Copy Markdown
Contributor

@abhimanyusinghgaur abhimanyusinghgaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 3 files at r1.
Reviewable status: 0 of 3 files reviewed, all discussions resolved (waiting on @abhimanyusinghgaur and @pawanrawal)

@JatinDev543 JatinDev543 merged commit b6edc7e into master Jan 13, 2021
@JatinDev543 JatinDev543 deleted the GRAPHQL-921 branch January 13, 2021 09:41
JatinDev543 added a commit that referenced this pull request Jan 15, 2021
Fixes GRAPHQL-921

The first mutation below will now return the "Mutation" type, which previously was giving an error.
Mutation:

mutation {
                       __typename
			addpost1(input: [{title: "Dgraph", numLikes: 92233720 }]) {
				post1 {
					title
					numLikes
				}
			}
		}

`Response:`
      {
                "__typename":"Mutation",
		"addpost1": {
			"post1": [{
				"title": "Dgraph",
				"numLikes": 92233720

			}]
		}
	}

(cherry picked from commit b6edc7e)
JatinDev543 added a commit that referenced this pull request Jan 15, 2021
…7303)

Fixes GRAPHQL-921

The first mutation below will now return the "Mutation" type, which previously was giving an error.
Mutation:

mutation {
                       __typename
			addpost1(input: [{title: "Dgraph", numLikes: 92233720 }]) {
				post1 {
					title
					numLikes
				}
			}
		}

`Response:`
      {
                "__typename":"Mutation",
		"addpost1": {
			"post1": [{
				"title": "Dgraph",
				"numLikes": 92233720

			}]
		}
	}

(cherry picked from commit b6edc7e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/graphql Issues related to GraphQL support on Dgraph.

Development

Successfully merging this pull request may close these issues.

2 participants