The alternative is to keep for each user a list of friends as a String (or Text) and do the "contains" check in your controller. This will make all your datastore calls quick at the expense of extra CPU usage. It also requires extra effort on update but the read is fast (and more frequent than write).
The important thing is not to overcomplicate your queries, so when you want to get all friends of user A, you just read a single entity (using A as key) containing the list of friends.