Skip to content
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

Fixed node-resolver tests #2603

Merged
merged 2 commits into from
Nov 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
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