In Scala 3.3.4, a warning is raised when we create a new anonymous class within an inline method. In the cases of Schema.Auto and ArgBuilder.Auto we can't do much about it since the automatic derivation only works by creating a new anonymous class so we just suppress the warning. In the case of SubscriptionSchema though we can fix it by creating a final class and then creating new instances of it.
Note that we could also do this, but since SubscriptionSchemas are not that common, I think it's better to just keep the code cleaner:
In Scala 3.3.4, a warning is raised when we create a new anonymous class within an
inline
method. In the cases ofSchema.Auto
andArgBuilder.Auto
we can't do much about it since the automatic derivation only works by creating a new anonymous class so we just suppress the warning. In the case ofSubscriptionSchema
though we can fix it by creating a final class and then creating new instances of it.Note that we could also do this, but since
SubscriptionSchema
s are not that common, I think it's better to just keep the code cleaner: