As you have seen above, the resolver is the one responsible for resolving the domain name to the desired data. The resolution though is a two step process, and as such, you can use the universal resolver to resolve the domain name to its address in a single rpc call. This is also the way most of the client libraries expect that a resolution should be done.
data is the ABI-encoded call data for the resolution function required - for example, the ABI encoding of addr(namehash(name)) when resolving the addr record.