Automatically generate enums for GraphType members based on the AST or Reflection#37
Automatically generate enums for GraphType members based on the AST or Reflection#37JKamsker wants to merge 10 commits intographql-dotnet:masterfrom
Conversation
| { | ||
| var result = base | ||
| .Field(name, expression, nullable, type) | ||
| .WithOriginalName(expression.NameOf()) |
There was a problem hiding this comment.
See graphql-dotnet/graphql-dotnet#1107, it will be better to use already implemented features.
There was a problem hiding this comment.
How do I have to use it? It wasn't "already implemented" when i initially did this last Winter.
Edit: Can't use the new feature as it uses an older version of graphql-net and im unable to upgrade it without causing a webserver failure.
There was a problem hiding this comment.
ORIGINAL_EXPRESSION_PROPERTY_NAME now internal, OK, I'll see what I can do.
There was a problem hiding this comment.
Hmm okay didn't notice the update, sorry my fault :D
But my solution still needs the sourcetype
There was a problem hiding this comment.
Now using the internal key ( /src/Graphql.Extensions.FieldEnums/SharedConstants.cs )
src/Graphql.Extensions.FieldEnums/Types/ServiceProviderExtensions.cs
Outdated
Show resolved
Hide resolved
src/StarWars/StarWarsQuery.cs
Outdated
| ).AddRange(DefaultQueryArguments.SkipTakeOrderByArguments<HumanType>()), | ||
| resolve: context => | ||
| { | ||
| var skipTakeArgs = SkipTakeOrderByArgument.Parse(context); |
src/StarWars/StarWarsQuery.cs
Outdated
| Func<ResolveFieldContext, string, object> func = (context, id) => data.GetDroidByIdAsync(id); | ||
| Func<ResolveFieldContext, string, object> func = (context, id) => | ||
| { | ||
| var skipTakeArgs = SkipTakeOrderByArgument.Parse(context); |
|
Implemented Own method for "Humans" to demonstrate the Usecase for the SkipTakeOrderBy class which contains the auto enum type |
|
News? |
|
Located somewhere at the top of my to-do list. While there is no time to do this closely. I remember that in the first review I was thinking of moving part of the code from this PR to the main project. |
|
Thanks for the update! |
|
@sungam3r Let's merge this as an example, either as-is, or as a separate example, rather leaving it as a perpetual PR. |
|
I remember this one. Give me some time to dive into details. IIRC I had an idea to move it into core repo at least part of it. I can take care about conflicts. |
|
@sungam3r Have you got updates? |
No description provided.