Use AND in the root function?

if I want to query a item whose a === 1 and b === 2, how to write the query? I can not find any example in the docs

Something like this

q(func: Type(User)) @filter(eq(a, 1) AND eq(b, 2)){

is it equivalent to q(func: eq(a, 1)) @filter(eq(b, 2)) ? which is better ?

It is similar in all ways.