Using the GRAVITY optical interferometer to observe and characterize giant exoplanets