-
-
Notifications
You must be signed in to change notification settings - Fork 782
fix: #8264 - fully qualified string not used for types in dataloader generator #8265
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
base: main
Are you sure you want to change the base?
Conversation
…taloader generator
ba643d0
to
562d9ba
Compare
Can you add a nullable test case? for both structs and classes? They should go here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR ensures that fully qualified type names are used consistently in DataLoader generators to address issue #8264. Key changes include:
- Updating snapshot files to use fully qualified type strings for resultMap parameters.
- Adding a new extension method, ToFullyQualifiedWithNullRefQualifier, in SymbolExtensions.cs.
- Refactoring DataLoaderFileBuilder to utilize the new helper instead of a hardcoded "global::" prefix.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
File | Description |
---|---|
snapshots/DataLoaderTests.*.md | Updated snapshots to include fully qualified type names. |
SymbolExtensions.cs | Added an extension method for fully qualified type formatting with null ref qualifier. |
DataLoaderFileBuilder.cs | Updated to use the new extension method for the resultMap parameter. |
Comments suppressed due to low confidence (1)
src/HotChocolate/Core/src/Types.Analyzers/Helpers/SymbolExtensions.cs:35
- Consider adding unit tests for the new ToFullyQualifiedWithNullRefQualifier method to verify its behavior across various type scenarios.
public static string ToFullyQualifiedWithNullRefQualifier(this ITypeSymbol typeSymbol)
…not-used-for-types-in-dataloader-generator
@michaelstaib nullable test cases are already present, eg: graphql-platform/src/HotChocolate/Core/test/Types.Analyzers.Tests/DataLoaderTests.cs Line 313 in 819f23c
But those tests are for |
@michaelstaib added a test case for #8264 issue, also covers nullable class type |
Summary of the changes (Less than 80 chars)
Closes #8264 (in this specific format)