sarkistlt / mongoose-schema-to-graphql

Use Mongoose schema to generate graphQL type.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Number" not supporting Date.now()

codemeasandwich opened this issue · comments

Could you change the mapping of Number to GraphQLFloat too allow for the sending of javascript timestamps?

const foo = mongoose.Schema({
  time: { type: Number, default: Date.now }
})

// ...

resolve:()=>({ time: Date.now() })

Thanks