Kiri, I've never had to graft in this situation! But I do have my handy dandy "Principles of Knitting" book. Let's see what she says....
She doesn't talk about grafting cables, just ribbing. As I feared, you can't perfectly graft ribbing (or cables, I'd say), unless you're grafting the top of one piece to the bottom of another piece. You can try it with the top of two pieces, but it will be off by half a stitch where the knitting switches to purling and vice versa....
My first thought, and this could be TOTALLY wrong, but it might be worth trying, is to do regular kitchener stitch until you reach the purled area, then turn your work inside out, so that those purled stitches are now knit stitches facing out, and continue as normal! The only adaptations I foresee are these: That before you turn the work inside out, when the purl stitch is the second stitch you're working after a knit stitch, I'd think you'd want to go into that purl stitch in the opposite direction as you would a knit stitch? Not sure! But this is my guess. Then, when you've turned the work inside out, you'll have what was the back needle as the front needle, and you'll have just worked that needle. So continue the pattern by first working the back needle.
....Okay, my curiousity got the best of me, so I just tried this out with a sample cable. It looks good! I did it with a top piece grafted to an removable-cast-on bottom piece. It looks correct! (Woohoo! Yay for me! LOL.) I'm not 100% sure about putting the needle in the opposite way when you come to a purl stitch. It seems to have worked perfectly on one side of the cable, but not on the other side. I'm not sure why the rule worked in one place, but not in another! Maybe I messed it up. In any case, it's a minor flaw that's not noticable in this case; and if you're grafting top to top pieces, it won't be perfect anyway. .... Let me know how it turns out for you, and if you can confirm this rule or not!
BTW, a rule of thumb for estimating whether your on the right row of the cable before grafting, is this.... If you hold the two pieces that you're about to graft together, needle against needle, and the cables line up perfectly, you've probably knit one row too many. If you line them up and the cable looks a little short, that's a good thing. The grafting will be adding a row.
Hope that helps!