If you are part of the Schema Extensions beta, you get an extra option when creating a function to create a Schema Extension. That's where you implement your function. If you're not part of the beta yet, please checkout
https://www.graph.cool/forum/t/feedback-schema-extensions-beta/405 to share your use case and ask for beta access.