Finding questions about the meaning of という isn't too hard, but the answers tend to revolve around its usage before a word particle or something, such as in ということ. However there's a sentence in a children's book - おむすびコロリン - where several words are said, then という, then a comma, then several more words:
おじいさんはごちそうになったうえに、ほしい物をなんでも出してくれるという、打ち出の小づちをおみやげにもらって帰りました。
という doesn't seem to be a special expression unto itself, not without help. But if you try to treat it as と and then 言う, how is that grammatically possible right before a comma? i.e., why wouldn't it be といい、 というと、 or といって?
EDIT
Something that just occurred to me: could it be that, despite where that comma is placed, いう is still ultimately modifying 打ち出の小槌, as in "a nursery-tale-magic-mallet that is said to bring forth anything which one desires"? If so, the comma seems kind of surprising, but they are used a little bit differently.