Title
m

markmiller21

11/15/2017, 5:51 PM
is there a way to set a default a value in my types.graphql file for a DateTime Field? I am trying to default the value to be the current date time if nothing is passed in. I need this to be different than the createdAt & updatedAt fields. So far I have tried
roundDateText: DateTime @defaultValue(value: () => new Date())
roundDateText: DateTime @defaultValue(value: new Date())
roundDateText: DateTime @defaultValue(value: Date())
j

jbonigomes

11/19/2017, 6:43 PM
Hi @markmiller21, I ran into the same requirement, do you have a solution thus far?
From what I have seen, it seems like they are working on it: https://github.com/graphcool/framework/issues/56