Integral of TGraph

If you want the integral under the graph curve I would create first a TF1 from the Graph and integrate the function, as in this example

double x[] = { 1,2,3,4,5,6,7,8,9,10};
double y[] = { 1,2,3,4,5,6,7,8,9,10}; 
TGraph g(10,x,y);
TF1 f1("f",[&](double *x, double *){ return g.Eval(x[0]); },1,10,0);
double integral = f1.Integral(1,10);

Lorenzo