Why does my granddaughter instantly switch moods?

She was diagnosed a type one diabetic two years ago and had a very tough time dealing with it. She has an attachment issue also; her mother just moved to a much nicer home, and she gets angry and demands to go back to her prior home. We do not understand what is going on, and it is driving us crazy.