Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Jan 13, 2021

Conversation

JatinDev543
Copy link
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
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