Fixing bug with only __typename in the selection set#1525
Merged
severussundar merged 16 commits intomainfrom Jul 6, 2023
Merged
Fixing bug with only __typename in the selection set#1525severussundar merged 16 commits intomainfrom
severussundar merged 16 commits intomainfrom
Conversation
Aniruddh25
reviewed
May 30, 2023
Aniruddh25
reviewed
May 30, 2023
Aniruddh25
requested changes
May 30, 2023
Collaborator
Aniruddh25
left a comment
There was a problem hiding this comment.
Waiting for few answers, perhaps the optimization of not hitting the db can be a followup PR
Contributor
I would have expected that to be the better approach, since you don't actually need any data back from the DB, but I can see there being a problem when you've done a query like: query {
books {
items {
__typename
}
}
}That should return a |
Aniruddh25
reviewed
Jun 29, 2023
Aniruddh25
approved these changes
Jun 29, 2023
Collaborator
Aniruddh25
left a comment
There was a problem hiding this comment.
LGTM after 1 optimization to generate expected output
Aniruddh25
reviewed
Jul 3, 2023
Aniruddh25
approved these changes
Jul 3, 2023
Collaborator
Aniruddh25
left a comment
There was a problem hiding this comment.
LGTM. Thanks for addressing all comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why make this change?
{ book_by_pk(id: 1){ __typename } }What is this change?
SqlQueryStructure, if it is observed that there are no columns selected, then one of the primary keys is added so that the eventual database query constructed contains a valid column name in the SELECT statement.How was this tested?