A grainy texture could be from the coconut oil not fully emulsifying with the other ingredients. Make sure to blend the mixture at a high speed for at least a minute to ensure everything is well combined.