How trigger a function when Subscribe method after triggered in apollo graphql play ground

how trigger a function when Subscribe method after triggered in apollo graphql play ground.

Do you want to call a function when a new client connects? I’m not quite sure what you’re asking.

Is this what you’re looking for?