package graph import ( "context" "errors" ) // getUserIDFromContext извлекает userID из контекста func getUserIDFromContext(ctx context.Context) (int, error) { userID, ok := ctx.Value("userID").(int) if !ok { return 0, errors.New("unauthorized") } return userID, nil }