-
-
Notifications
You must be signed in to change notification settings - Fork 39
Small code/readme cleanup + CI fix #62
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
Conversation
fixes graphql-dotnet#61 heap allocation optimizations null argument checks add comments formatting remove MVC from example
|
I apologize for the big PR. I just wanted to look at this repository for a long time and finally I was able to do it. Also, I expect to support this project in the future, because my team uses it in the production. |
|
@sungam3r This looks really useful. If I understand the current state of this PR correctly, I should already be able to follow your improved Readme to setup authorization for my project without any breaking changes, right? |
|
Well, you may try. Basically, everything should work. |
|
First of all, thanks for raising this one. The broken README.md was starting to cause me nightmares. One thing, though: In the README.md, the call to You have but it should be the following, including the IServiceProvider? |
more cleanup
|
@iamkoch the README could say .AddTeddyBears() and it would not be wrong. That is just an example of what YOU are supposed to write in your own project. So it is whatever YOU decide it is. |
|
@iamkoch There are two overloads, I use overload with one parameter, but in the readme gave an example of overload with two parameters. Fixed. I updated GraphQL dependency, there were some changes in the api. |
|
I need to find time to get back to this PR and make sure that it is ready for merge. |
joemcbride
left a comment
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.
As I’ve stated in other PRs, there are a ton of formatting changes that are not needed and not required. If you’re fixing bugs or adding features please do those as separate PRs so they can be independently reviewed.
|
I will make small focused PRs. |
|
@joemcbride In general, the main thing that once stopped me from continuing to work on this PR is a similar package for authorization in the server project. I saw that they are very similar. I understand that second project uses a specific ASP.NET Core auth api. Nevertheless, there was a desire to understand both and, if possible, bring them to the same denominator. Ideally, I would like the solution when there would be no copied code at all between the two projects. Do you think it's worth the effort? |
|
@sungam3r maybe - though the intent of this project was so that it would not be ASP.NET |
|
If the sample code is invalid or doesn't compile then why bother adding
sample code? The PR looks to address inconsistencies in the sample code
borne out of changes to the main repo, so imo I'm warranted in raising a
very minor issue about its correctness.
…On Wed, 27 Nov 2019, 15:09 Joe McBride, ***@***.***> wrote:
@iamkoch <https://github.com/iamkoch> the README could say
.AddTeddyBears() and it would not be wrong. That is just an example of what
YOU are supposed to write in your own project. So it is whatever YOU decide
it is.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#62?email_source=notifications&email_token=AAGBMDKV2WG4GPHYFAQ46B3QV2EUJA5CNFSM4IZAKZO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFJZSTY#issuecomment-559126863>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGBMDOSQ4BCRTQOEPVZKMTQV2EUJANCNFSM4IZAKZOQ>
.
|
|
Sample code is valid and compiles. Talk about which version of the example would be better to show. |
|
This PR will be revised after #84 |
… cleanup # Conflicts: # README.md # appveyor.yml # src/GraphQL.Authorization.Tests/AuthenticatedUserRequirementTests.cs # src/GraphQL.Authorization.Tests/AuthorizationEvaluatorTests.cs # src/GraphQL.Authorization.Tests/AuthorizationSchemaBuilderTests.cs # src/GraphQL.Authorization.Tests/AuthorizationSettingsTests.cs # src/GraphQL.Authorization.Tests/AuthorizationValidationRuleTests.cs # src/GraphQL.Authorization.Tests/ClaimAuthorizationRequirementTests.cs # src/GraphQL.Authorization.Tests/GraphQL.Authorization.Tests.csproj # src/GraphQL.Authorization.Tests/ValidationTestBase.cs # src/GraphQL.Authorization.sln # src/GraphQL.Authorization/AuthorizationEvaluator.cs # src/GraphQL.Authorization/AuthorizationMetadataExtensions.cs # src/GraphQL.Authorization/AuthorizationPolicyBuilder.cs # src/GraphQL.Authorization/AuthorizationValidationRule.cs # src/GraphQL.Authorization/GraphQL.Authorization.csproj # src/GraphQL.Authorization/Requirements/ClaimAuthorizationRequirement.cs # src/Harness/GraphQLAuthExtensions.cs # src/Harness/Harness.csproj # src/Harness/Program.cs # src/Harness/Properties/launchSettings.json # src/Harness/Startup.cs
… cleanup # Conflicts: # src/GraphQL.Authorization.Tests/AuthorizationEvaluatorTests.cs # src/GraphQL.Authorization/AuthorizationPolicy.cs # src/GraphQL.Authorization/AuthorizationPolicyBuilder.cs # src/GraphQL.Authorization/AuthorizationResult.cs # src/GraphQL.Authorization/AuthorizationSettings.cs # src/GraphQL.Authorization/IAuthorizationPolicy.cs # src/GraphQL.Authorization/IProvideClaimsPrincipal.cs # src/GraphQL.Authorization/Requirements/ClaimAuthorizationRequirement.cs # src/GraphQL.Authorization/Requirements/IAuthorizationRequirement.cs
… cleanup # Conflicts: # src/GraphQL.Authorization.ApiTests/GraphQL.Authorization.approved.txt # src/GraphQL.Authorization.Tests/AuthenticatedUserRequirementTests.cs # src/GraphQL.Authorization.Tests/AuthorizationSchemaBuilderTests.cs # src/GraphQL.Authorization.Tests/AuthorizationValidationRuleTests.cs # src/GraphQL.Authorization/AuthorizationContext.cs # src/GraphQL.Authorization/AuthorizationEvaluator.cs # src/GraphQL.Authorization/AuthorizationMetadataExtensions.cs # src/GraphQL.Authorization/AuthorizationSettings.cs
… cleanup # Conflicts: # README.md # src/GraphQL.Authorization.ApiTests/GraphQL.Authorization.approved.txt # src/GraphQL.Authorization/AuthorizationContext.cs # src/GraphQL.Authorization/AuthorizationEvaluator.cs # src/GraphQL.Authorization/AuthorizationSettings.cs # src/GraphQL.Authorization/IAuthorizationEvaluator.cs # src/Harness/GraphQL.cs
|
@Shane32 Meet our old friend here |
|
Regarding labeler: graphql-dotnet/graphql-dotnet#2439 |

[UPDATE] See #87 first.
fixes #50fixes #61heap allocation optimizationsnull argument checksadd commentsformattingremove MVC from example