It's impressive that the entire thing is in pl/pgsql (apart from parsing).
Have you considered any other implementation strategies (C native extension, any other pl/* or maybe running an out of PostgreSQL process which does GraphQL to SQL compilation)?