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

@fake directive doesn't handle datatype values like boolean or array #145

Open johannchopin opened 3 years ago

johannchopin commented 3 years ago

Hey team 👋 Thanks a lot for your work on this one 👍

So I can fake an uuid value by using:

@fake(type: uuid)

But if I try to fake another datatype from fakerjs like boolean or array it doesn't work:

@fake(type: boolean)

Expected type fake__Types, found boolean. Did you mean the enum value dbColumn?

Sure I can use the @examples workaround but it would be simpler to have all the fakerjs method implemented:

@examples(values: [true, false])