You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type PresetDates {
edited(format: String): StringDate! @gofield(name:"DatetimeFormatResolver")
added(format: String): StringDate! @gofield(name:"DatetimeFormatResolver")
}
1 i have many fields where i need to convert some types, in that example i converting date to string, on each field automatically generate a resolver from where i call function that execute a logic , but i think it will be better if i can set somewhere a function directly, it reduce considedable a code, now i have in project arount a 100 same resolvers.
2 also if i set direct name of resolver ( to can reuse one ), it generate a few identical function, is normal?
example generated go interface ( also in resolver appear 2 identical function ):
type PresetDatesResolver interface {
DatetimeFormatResolver(ctx context.Context, obj *structure_999.PresetDates, input *domain.DatetimeFormat) (string, error)
DatetimeFormatResolver(ctx context.Context, obj *structure_999.PresetDates, input *domain.DatetimeFormat) (string, error)
}
3 Is posible to set a global resolver? for some conversion, and set that on field settings
The text was updated successfully, but these errors were encountered:
type PresetDates {
edited(format: String): StringDate! @gofield(name:"DatetimeFormatResolver")
added(format: String): StringDate! @gofield(name:"DatetimeFormatResolver")
}
1 i have many fields where i need to convert some types, in that example i converting date to string, on each field automatically generate a resolver from where i call function that execute a logic , but i think it will be better if i can set somewhere a function directly, it reduce considedable a code, now i have in project arount a 100 same resolvers.
2 also if i set direct name of resolver ( to can reuse one ), it generate a few identical function, is normal?
example generated go interface ( also in resolver appear 2 identical function ):
type PresetDatesResolver interface {
DatetimeFormatResolver(ctx context.Context, obj *structure_999.PresetDates, input *domain.DatetimeFormat) (string, error)
DatetimeFormatResolver(ctx context.Context, obj *structure_999.PresetDates, input *domain.DatetimeFormat) (string, error)
}
3 Is posible to set a global resolver? for some conversion, and set that on field settings
The text was updated successfully, but these errors were encountered: