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

Items in a list are non-unique when using examples #137

Open pramodshri opened 3 years ago

pramodshri commented 3 years ago

For a graphql field with fake directives like below :

codes: [String] @listLength(min: 1, max: 3) @examples(values: ["1", "2", "3", "4", "5"])

i am getting duplicated results many times. Is there a way to tell the faker that i want the items to be unique?

lypborges commented 3 years ago

Would be nice if we have a way to pass a function that receive the params and return the fake data.

fatadel commented 2 years ago

I am also interested in getting distinct examples only. Have you got any response from the maintainers, @pramodshri?