We report a graphene-assisted all-optical control of a fiber Bragg grating (FBG), which enables in-fiber optical bistability and switching. With an optical pump, a micro-FBG wrapped by graphene evolves into chirped and phase-shifted FBGs, whose characteristic wavelengths and bandwidths could be controlled by the pump power. Optical bistability and multistability are achieved in the controlled FBG based on a shifted Bragg reflection or Fabry-Perot-type resonance, which allow the implementation of optical switching with an extinction ratio exceeding 20 dB and a response time in tens of milliseconds.