Catabolic reactions are those that make larger/more complex molecules into those that are smaller/less complex, releasing energy.
Anabolic reactions are those that makes smaller/less complex molecules into those that are larger/more complex, costing energy.
Photosynthesis takes two of the least complex molecules from the perspective of biology, carbon dioxide and water, and forms glucose which is high-energy and complex - this is clearly an anabolic reaction.
The only way I can interpret your question is that you were misunderstanding the definitions of catabolic and anabolic.