graphql-kit / graphql-faker

🎲 Mock or extend your GraphQL API with faked data. No coding required.
MIT License
2.69k stars 225 forks source link

Faking a date range #108

Closed Robvio closed 4 years ago

Robvio commented 4 years ago

We're using and love graphql-faker, but we've run into an issue were we need to have dates between some range.

Faker.js seems to have this

faker.date.between('2015-01-01', '2015-12-31'); //returns "2015-04-03T20:10:12.819Z"

But I don't see it implemented here:

https://github.com/APIs-guru/graphql-faker/blob/82c3dd0af5c818dc3e9df91f528e3269c8dba15b/src/fake.ts#L78

It seems to just be future or past. Am I misreading it?

This is a great project, thanks so much for doing it!

IvanGoncharov commented 4 years ago

@Robvio Thanks 👍 I want to add a few other small fixes into the next release. So will try to release tomorrow.

IvanGoncharov commented 4 years ago

@Robvio Released as graphql-faker@2.0.0-rc.18 🎉