Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (13 sloc) 436 Bytes
using GraphQL.Types;
using System.Security.Claims;
using FullStackJobs.GraphQL.Common.Extensions;
namespace FullStackJobs.GraphQL.Infrastructure.GraphQL.Extensions
{
public static class GraphQLExtensions
{
public static string GetUserId(this ResolveFieldContext<object> context)
{
return ((GraphQLUserContext)context.UserContext).User.GetClaimValue(ClaimTypes.NameIdentifier);
}
}
}
You can’t perform that action at this time.