Current style of providing example values through annotations have some serious limitations:
As the examples are tightly bound with the schema definition, it is not possible to use schema files generated by another tools.
Sometimes constraints for fake data would be useful (and by my opinion should be defined along with the examples). For example, in our GQL API we receive an array of objects from server, where all object should have a unique key value.
Latest version of GraphQL plugin in PHPStorm is completely broken when using a schema file with @examples annotations.
A programmatical way of providing examples or generating fake data using some constraints would be very useful. Or, isn't there some undocumented way how to do that with current version?
Current style of providing example values through annotations have some serious limitations:
@examples
annotations.A programmatical way of providing examples or generating fake data using some constraints would be very useful. Or, isn't there some undocumented way how to do that with current version?