I’ve asked for something “like” this before. But it was different.
A faker comes in handy when it comes to query planning and even the logical structure of your bussines layer.
Example GitHub - graphql-kit/graphql-faker: 🎲 Mock or extend your GraphQL API with faked data. No coding required.
I did a strange example of syntax below.
This would be interesting to handle query planning visually.
query {
Allusers(func: eq(Type, -> faker @return.string."user")) {
id : uid -> faker @uid
name -> faker @names
age -> faker @ages
married -> faker @boolean.aleatory
Messages -> faker @22x {
id : uid -> faker @uid
Type -> faker @return.string."message" #This would return the exacly string wrinten to all examples
SendBy -> faker @user
Title -> faker @loremipsum.31.title
Text -> faker @loremipsum.140
Timestamp -> faker @datetime
session -> faker @number.aleatory.3
ageversion-> faker @number.aleatory.3 + @facets.somefacet #just guessing
}
friends -> faker @10x {
id : uid -> faker @uid
name -> faker @names
age -> faker @ages
married -> faker @boolean.aleatory
}
}}