We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1393d03 + aacc1da commit b87b486Copy full SHA for b87b486
Micro.Auth.Api/GraphQL/Types/UserType.cs
@@ -10,7 +10,7 @@ namespace Micro.Auth.Api.GraphQL.Types
10
{
11
public sealed class UserType : FederatedObjectGraphType<User>
12
13
- public UserType(SessionByUserDataLoader sessionLoader)
+ public UserType(SessionByUserDataLoader sessionLoader, UserByIdDataLoader userLoader)
14
15
Name = "User";
16
Key("id");
@@ -25,10 +25,7 @@ public UserType(SessionByUserDataLoader sessionLoader)
25
ResolveReferenceAsync(async ctx =>
26
27
var id = ctx.Arguments["id"].ToString();
28
- return new User
29
- {
30
- Id = id,
31
- };
+ return await userLoader.LoadAsync(id).GetResultAsync();
32
});
33
}
34
0 commit comments