Skip to content

Commit

Permalink
Fixed node-resolver test (#2603)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Nov 18, 2020
1 parent 30974bb commit b8259ee
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -19,7 +19,7 @@ public async Task NodeId_Is_Correctly_Formatted()
.AddObjectType<Bar>(d => d
.AsNode()
.IdField(t => t.Id)
.NodeResolver((ctx, id) => Task.FromResult(new Bar { Id = id })))
.NodeResolver((_, id) => Task.FromResult(new Bar { Id = id })))
.Create();

IRequestExecutor executor = schema.MakeExecutable();
Expand All @@ -44,7 +44,7 @@ public async Task Node_Type_Is_Correctly_In_Context()
.AddObjectType<Bar>(d => d
.AsNode()
.IdField(t => t.Id)
.NodeResolver((ctx, id) => Task.FromResult(new Bar { Id = id })))
.NodeResolver((_, id) => Task.FromResult(new Bar { Id = id })))
.Use(next => async ctx =>
{
await next(ctx);
Expand Down Expand Up @@ -105,7 +105,7 @@ public async Task Node_Resolve_Parent_Id()
.AddObjectType<Child>(d => d
.ImplementsNode()
.IdField(t => t.Id)
.ResolveNode((ctx, id) => Task.FromResult(new Child { Id = id })))
.ResolveNode((_, id) => Task.FromResult(new Child { Id = id })))
.Create();

IRequestExecutor executor = schema.MakeExecutable();
Expand Down Expand Up @@ -227,7 +227,7 @@ public class Bar

public class BarResolver
{
public Bar GetBarAsync(string id) => new Bar { Id = id };
public Task<Bar> GetBarAsync(string id) => Task.FromResult(new Bar { Id = id });
}

public class Foo1
Expand Down

0 comments on commit b8259ee

Please sign in to comment.