Make use of query "kinds".

Differentiate read|write|schema cases and use appropriate phantom types.