Absinthe Schema default_value using a function

Is there a way to set a default_value in a schema using a function?

E.g. now() for a time field?

I’m sorry, no. I tend to agree with this related issue:

defaultValue is specifically intended to be static so that introspection can safely serialize the defaultValue and clients could use introspection to determine if they need to provide.

3 Likes

This is also necessary for subscription documents, since the default value is simply set once when the document is submitted, and would not be refreshed on subsequent publications.

2 Likes