No, that won’t work, ACF does not actually do anything on that hook and only provides it so that you can alter the query that’s going to be run anyway.
To replace the query completely you’d need to figure out how to remove the ajax actions that are called, and unfortunately, I don’t see any way to do that….
and then I find one.
So I’ve never really given this much thought, and I cannot tell you everything that is involved, this is just a vague idea of how it could be done.
EDIT: making sure that you return the values for the relationship field exactly the way that ACF returns the values
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!