Fixed point theorems for self and non-self F-contractions in metric spaces endowed with a graph