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): Fix getType queries when id was used as a name for types other than ID (#6130) #6180

Merged
merged 1 commit into from
Aug 14, 2020

Conversation

JatinDev543
Copy link
Contributor

@JatinDev543 JatinDev543 commented Aug 13, 2020

For the schema

type Tweets {
id: String! @id
score: Int
}

getTweets query was not being properly re-written. This is because we were using the name id to signify that a field is of type ID instead of the type ID itself. That has been fixed now. So getTweets would work if the field was named anything.

query MyQuery {
getTweets(id: "1286891968727982081") {
score
id
}
}

(cherry picked from commit bb8e4b9)


This change is Reviewable

Docs Preview: Dgraph Preview

…s other than ID (#6130)

For the schema

type Tweets {
	id: String! @id
	score: Int
}

getTweets query was not being properly re-written. This is because we were using the name id to signify that a field is of type ID instead of the type ID itself. That has been fixed now. So getTweets would work if the field was named anything.

query MyQuery {
  getTweets(id: "1286891968727982081") {
    score
    id
  }
}

(cherry picked from commit bb8e4b9)
@github-actions github-actions bot added the area/graphql Issues related to GraphQL support on Dgraph. label Aug 13, 2020
Copy link
Contributor

@pawanrawal pawanrawal left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @MichaelJCompton)

@JatinDev543 JatinDev543 merged commit cd11d57 into release/v20.07 Aug 14, 2020
@JatinDev543 JatinDev543 deleted the pawan/cherry-pick-fixGetTypeQueryID branch August 14, 2020 07:33
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