Closed RichardLindhout closed 3 years ago
The program will now look in the package and look for functions with the same name as the generated one's. If a custom one exist e.g.
convert_override.go
package helpers
import (
"github.com/../app/backend/graphql_models"
"github.com/../app/backend/models"
)
func UserCreateInputToBoiler(
m *graphql_models.UserCreateInput,
) *models.User {
if m == nil {
return nil
}
originalConvert := originalUserCreateInputToBoiler(m)
// TODO: bcryp pass
return originalConvert
}
The function in the template get's changed to userCreateInputToBoiler
Released in v3.1.0
Do a three-way-diff merge for changes and let user choose parts of code which should not take over generated code.{defaultNameOfResolver}_custom.goEvery function which is stated there will be skipped in generation.