Question: if i were a boy who wrote it
Answer: It was written by BC Jean and Toby Gad , who also handled its production alongside Beyoncé .