Were there any folding wing biplanes?
The Blackburn Ripon -- a British carrier-based torpedo bomber -- is such example (first flight 1926):


Source: aviadejavu.ru via Flight


Source: Imperial War Museums -- seen here landing on HMS Furious



Earliest mentions I found -- not necessarily carrier-based, and not necessarily real(?):


Source: Flight -- 1911


Source: Flight -- folding wings on the aerial-saw concept from 1915 (click image to view)