Fixes the bug #1680 that necessitated adding the 'name' parameter to the @model directive, regardless of the name of the GraphQL object type's name. - #1706
Merged
Aniruddh Munde (Aniruddh25) merged 6 commits intoSep 14, 2023
Conversation
neeraj-sharma2592
requested review from
Aniruddh Munde (Aniruddh25),
Jelte Fennema-Nio (JelteF),
Mathieu Tremblay (Mathos1432),
aaronburtle,
Aaron Powell (aaronpowell),
Abhishek Kumar (abhishekkumams),
Ayush Agarwal (ayush3797),
Gledis Zeneli (gledis69),
Bhaskar Mallapragada (mbhaskar),
Milis (milismsft),
Ravi Shetye (ravishetye),
Sean Leonard (seantleonard),
Shyam Sundar J (severussundar) and
tarazou9
as code owners
September 11, 2023 17:01
Sean Leonard (seantleonard)
left a comment
Contributor
There was a problem hiding this comment.
Thanks for addressing and looks good so far. Looking forward to seeing a test before merging.
added 2 commits
September 12, 2023 16:55
added 2 commits
September 13, 2023 16:02
…where the 'name' attribute is not explicitly added in the schema
Contributor
Author
I have modified the schema to test this scenario. We had a 'name' attribute for each model, and we couldn't identify this regression through our integration tests. Please let me know if this seems correct. |
neeraj-sharma2592
requested review from
Aniruddh Munde (Aniruddh25) and
Sean Leonard (seantleonard)
September 13, 2023 10:50
Aniruddh Munde (Aniruddh25)
approved these changes
Sep 13, 2023
Aniruddh Munde (Aniruddh25)
approved these changes
Sep 13, 2023
Aniruddh Munde (Aniruddh25)
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, thanks alot for the quick fix and the test!!
Sean Leonard (seantleonard)
approved these changes
Sep 14, 2023
Sean Leonard (seantleonard)
left a comment
Contributor
There was a problem hiding this comment.
Thanks for adding a test and pushing this fix.
Aniruddh Munde (Aniruddh25)
deleted the
dev/neeraj-sharma2592/fixNameDirectiveInvalidArgException
branch
September 14, 2023 00:52
neeraj-sharma2592
restored the
dev/neeraj-sharma2592/fixNameDirectiveInvalidArgException
branch
September 14, 2023 07:16
neeraj-sharma2592
deleted the
dev/neeraj-sharma2592/fixNameDirectiveInvalidArgException
branch
September 14, 2023 07:19
neeraj-sharma2592
added a commit
that referenced
this pull request
Sep 14, 2023
…the @model directive, regardless of the name of the GraphQL object type's name. (#1706) ## Why make this change? - Closes #1680 - Regression introduced in 0.8.49 caused required explicitly adding "name" directive for all the model/entity irrespective of whether we are using a different name than the one it originally has. - Regression introduced in #1402 when we started using TryExtractGraphQLName as follows: ``` string typeName = GraphQLUtils.TryExtractGraphQLFieldModelName(underlyingType.Directives, out string? modelName) ? modelName : underlyingType.Name; ``` ## What is this change? Checking Directive "name" exists before accessing its value. ## How was this tested? Tested locally for now. Will be checking Test cases for it. - [x] Integration Tests - [ ] Unit Tests --------- Co-authored-by: Neeraj Sharma <neesharma@microsoft.com>
neeraj-sharma2592
added a commit
that referenced
this pull request
Sep 18, 2023
…the @model directive, regardless of the name of the GraphQL object type's name. (#1706) ## Why make this change? - Closes #1680 - Regression introduced in 0.8.49 caused required explicitly adding "name" directive for all the model/entity irrespective of whether we are using a different name than the one it originally has. - Regression introduced in #1402 when we started using TryExtractGraphQLName as follows: ``` string typeName = GraphQLUtils.TryExtractGraphQLFieldModelName(underlyingType.Directives, out string? modelName) ? modelName : underlyingType.Name; ``` ## What is this change? Checking Directive "name" exists before accessing its value. ## How was this tested? Tested locally for now. Will be checking Test cases for it. - [x] Integration Tests - [ ] Unit Tests --------- Co-authored-by: Neeraj Sharma <neesharma@microsoft.com>
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?
What is this change?
How was this tested?