-
Notifications
You must be signed in to change notification settings - Fork 188
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
Automatically generate enums for GraphType members based on the AST or Reflection #37
base: master
Are you sure you want to change the base?
Conversation
{ | ||
var result = base | ||
.Field(name, expression, nullable, type) | ||
.WithOriginalName(expression.NameOf()) |
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.
See graphql-dotnet/graphql-dotnet#1107, it will be better to use already implemented features.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even after #38 ?
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.
ORIGINAL_EXPRESSION_PROPERTY_NAME
now internal, OK, I'll see what I can do.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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); |
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.
unused variable
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); |
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.
unused variable
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.