-
-
Notifications
You must be signed in to change notification settings - Fork 916
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
Roslyn analyzers #3732
Comments
@Shane32 I checked all the |
And it should be pretty uncommon for type-first code. Like I’m sure I use OutputType a few times in my code, but that would be it. Not worth an analyzer. |
Great then! I'll look now into code generation for |
That sounds great! |
Just FYI, here's a few comments that may be helpful: When When In the past, I had been thinking about replacing the
|
I don't really have any other goals for 7.7. So whenever you finish the analyzers or anything else that you think should be included in 7.7, lmk and we can release it. For v8, I'd like to be sure to review, polish and release the federation-related PRs that exist, plus these features:
Another feature for v8 we had been considering was alterations so that the field builders were distinct for input and output types, so intellisense would not display field builder methods which are only applicable to output types, and so on. And then there's also the connections / connection builders. Connections don't work in the AOT sample right now. I'd really like to fix that ... somehow... See #3550 (which accurately identifies that the AOT sample does not work, but in so doing breaks the AOT tests). |
Nothing specifically for 7.7, but I want to add the
Will it also allow mapping names? If so, the As for the AOT, I need to learn about it first, but code generation can probably solve all the problems (yeah, my golden hammer from now 😆) |
Another analyzer idea: prevent invalid uses of //valid
GraphQLClrInputTypeReference<string>
//invalid
GraphQLClrInputTypeReference<StringGraphType> Ditto for We do have type constraints for |
Good idea. will do. |
@Shane32 I can't see analyzer pages on the docs site. Did I miss some configuration? |
Oh, I see. Need to add an entry to |
@Shane32 I'm reviewing the GQL007 and GQL010. Should we allow |
Well, v7 does not allow internal properties, and for reference System.Text.Json does not normally deserialize to internal properties (see here). v7 did allow internal/private constructors, but I don't think it should have done so. I would just leave it alone. |
This is an aggregating issue for Roslyn analyzers, code refactorings, and source generators. The list will be updated with additional suggestions.
Analyzers+CodeFixes
Field().Name("name")
withField("name")
- Add GraphQL.Analyzers #3697Field(name, description, ...)
withField(name).Description(description)...
- Add GraphQL.Analyzers #3697Connection().Name("name")
withConnection("name")
- Rewrite the obsolete Name method on ConnectionBuilder #3747Argument<TArgumentGraphType, TArgumentType>
withArgument<TArgumentGraphType>
- FieldArgumentAnalyzer #3755Resolve*
methods and rewrite withResolve*Async
- Analyzers/awaitable resolver analyzer #3763CodeRefactoring
Arguments(new QueryArgument(), ...)
method with a chain of.Argument()
calls (and back?)Source generation
ObjectExtensions.ToObject
, which uses reflection with a source generator - RewriteObjectExtensions.ToObject
with source generator #3757The text was updated successfully, but these errors were encountered: