Then it sounds like you have a decent shot. I assume that your partner lives with you and the child and is a big part of the child's life?
That is the key. If you die, the court would place the child with a person to care for the child with one consideration...and really only one consideration. "what is best for the child". If your partner is involved in the day to day raising of the child, the court is much more likely to allow them to raise the child, vice a dad in jail, a mom who is not able to or some foster family.
SO, you ask If I pass away. I would like my domestic partner to have custody of my grandson. What do I need to do?
Answer: Put this in your will. When a child's parent or guardian dies, the court will look to the will to determine their (the parents) desires. The court is NOT obligated to follow the parents wishes...as I mention, the court is concerned about what is best for the child only, but the court will look to that parent or guardians desires as a starting point.
SO, assuming your partner is part of the child's life now? If you put in your will your desires, that would go a very long way to get he court to grant custody to your partner, should you pass away.
Let me know if you have more questions