UnicodeBOM must be [ignored](https://spec.graphql.org/October2021/#sec-Appendix-Grammar-Summary.Ignored-Tokens) everywhere in a document not just at the beginning.