Let math function support GraphQL Variables

Is this possible? I want to return the $offset value in the query result.