Skip to content

Commit

Permalink
Merge pull request #76 from graphql-dotnet/preview
Browse files Browse the repository at this point in the history
Project upgrades
  • Loading branch information
joemcbride authored May 14, 2020
2 parents d500861 + db8c10d commit d8b6390
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GraphQL.NewtonsoftJson" Version="3.0.0-preview-1648" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
6 changes: 2 additions & 4 deletions src/GraphQL.Authorization.Tests/ValidationTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using GraphQL;
using GraphQL.Execution;
using GraphQL.Http;
using GraphQL.NewtonsoftJson;
using GraphQL.Types;
using GraphQL.Validation;
using Shouldly;
using Xunit;

namespace GraphQL.Authorization.Tests
{
Expand All @@ -30,7 +28,7 @@ public void Rule(params IValidationRule[] rules)

public class GraphQLUserContext : Dictionary<string, object>, IProvideClaimsPrincipal
{
public ClaimsPrincipal User { get; set;}
public ClaimsPrincipal User { get; set; }
}

public class ValidationTestBase
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL.Authorization/AuthorizationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class AuthorizationContext

public object UserContext { get; set; }

public Dictionary<string, object> InputVariables { get; set; }
public IDictionary<string, object> InputVariables { get; set; }

public IEnumerable<string> Errors => _errors;

Expand Down
4 changes: 2 additions & 2 deletions src/GraphQL.Authorization/AuthorizationEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public interface IAuthorizationEvaluator
Task<AuthorizationResult> Evaluate(
ClaimsPrincipal principal,
object userContext,
Dictionary<string, object> arguments,
IDictionary<string, object> arguments,
IEnumerable<string> requiredPolicies);
}

Expand All @@ -26,7 +26,7 @@ public AuthorizationEvaluator(AuthorizationSettings settings)
public async Task<AuthorizationResult> Evaluate(
ClaimsPrincipal principal,
object userContext,
Dictionary<string, object> inputVariables,
IDictionary<string, object> inputVariables,
IEnumerable<string> requiredPolicies)
{
var context = new AuthorizationContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static Task<AuthorizationResult> Authorize(
this IProvideMetadata type,
ClaimsPrincipal principal,
object userContext,
Dictionary<string, object> inputVariables,
IDictionary<string, object> inputVariables,
IAuthorizationEvaluator evaluator)
{
var list = GetPolicies(type);
Expand Down
1 change: 0 additions & 1 deletion src/GraphQL.Authorization/AuthorizationValidationRule.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using GraphQL.Language.AST;
using GraphQL.Types;
Expand Down
4 changes: 2 additions & 2 deletions src/GraphQL.Authorization/GraphQL.Authorization.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>A toolset for authorizing access to graph types for GraphQL .NET</Description>
Expand All @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="GraphQL" Version="3.0.0-preview-1352" />
<PackageReference Include="GraphQL" Version="3.0.0-preview-1648" />
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion src/Harness/GraphQLAuthExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Microsoft.Extensions.DependencyInjection.Extensions;
using GraphQL.Authorization;
using GraphQL.Validation;
using System.Threading.Tasks;

namespace Harness
{
Expand Down
2 changes: 1 addition & 1 deletion src/Harness/Harness.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="GraphQL" Version="3.0.0-preview-1352" />
<PackageReference Include="GraphQL" Version="3.0.0-preview-1648" />
<PackageReference Include="GraphQL.Server.Ui.GraphiQL" Version="3.5.0-alpha0027" />
<PackageReference Include="GraphQL.Server.Transports.AspNetCore" Version="3.5.0-alpha0027" />
<PackageReference Include="Microsoft.AspNetCore.All" />
Expand Down

0 comments on commit d8b6390

Please sign in to comment.