I planted Goji berries years ago when I was interested in eating the berries, and hadn’t yet discovered how invasive they were. I am told that they like slightly alkaline soil, and indeed mine revel in it and come up everywhere despite whatever obstacles I put in their way. But as far as I’m concerned their invasiveness is a positive boon, since my favorite part of the plant is the young shoot.
Gojis want to ramp away into big lanky vines that sprawl everywhere and don’t bear much fruit, but some trimming helps them settle down and stick to their work.
I tie mine to fences or stakes about 40 inches above the ground, and then in the spring I whack off everything above that point. There is no artistry involved in this pruning; you can do it with a hedge trimmer. Then they grow new branches which drape down artistically from the point where they are tied, and are covered with fruit in season. They are very ornamental and can be grown in the front yard. They are also highly drought tolerant once established. The fruit tastes rather like a tiny tomato with a hint of bitterness. I use it mostly for fermenting into hot sauce and making superfruit sauce. You will find material online suggesting that the berries will prevent cancer and Alzheimer’s and make you live longer. I don’t get excited about that kind of talk, and I hope that you don’t either. They do have a good nutrient content, including doses of lutein and zeaxanthin that might be useful in helping to prevent macular degeneration, however be aware that the berries have not been researched for that purpose.
My favorite part of the plant is the young shoots that come up in places where I don’t want them, so I can pick them and eat them. Please note that the shoots are only edible when they are young, tender, and snap cleanly off as soon as you try to bend them. If they will bend without snapping, they are not fit to eat. I chop a bundle of shoots into fine cross section, about 1/4” lengths, and stirfry with some garlic, ginger, and soy, and find them very good. If the stems are getting wiry and bendable, you can still harvest the leaves and add them to mixed greens or cook them lightly in a Thai-style curry.
Now, about those health claims: I find two opposite sets of claims being made about Goji berries and leaves (the leaves are widely used for tea in Asia and are used in traditional Chinese medicine.) One is that the components of both leaves and berries include multiple antioxidants and compounds that act as anti-inflammatories in vitro and in vivo. This view is based both on their traditional uses and on the fact that multiple flavonoid antioxidants have been identified in both leaves and berries.
Below is a link to a simple analysis of components of the leaves.
https://www.ncbi.nlm.nih.gov/pubmed/28095717
Below is an analysis of anti-inflammatory activity in extracts of three berry species, including Goji berries, in vivo in mice.
https://www.ncbi.nlm.nih.gov/pubmed/27114691
The other point of view is that, as a distant member of the nightshade family, this plant should be avoided in its entirety. I have not found any credible research suggesting that the vast majority of us have any reason to avoid nightshades. I also don’t find it credible that a plant which contains numerous compounds that have demonstrated anti-inflammatory activity both in vitro and in vivo (beta-sitosterol, betaine, and hydroxycinnamic acid amides, to name only a few) would suddenly become inflammatory when eaten. If you feel that eating gojis makes your stomach burn or your joints hurt, by all means avoid them. You are the author of the owner’s manual for your own body. But to go from there to saying that nobody should eat them is quite a leap, and ignores demographic evidence.
This is a picture of goji berries being grown commercially in China, apparently staked up in more or less the same way that I do it but more neatly and artistically. When covered with their fruit in summer, they are as radiant as Christmas trees.