This is a relatively basic random query generator that's targeted at stress-testing The Graph's graph node. It is relying heavily on IBM's graphql-query-generator.
What it does is use the target subgraph's GraphQL schema, as well as pull all queryable IDs for all data types to generate the random queries. It is not capable of creating filters other than specific IDs. The generated queries will feature repetitions, nesting, etc.
Note that Semiotic AI does not guarantee support and maintenance of this software. It is released for its potential usefulness to The Graph indexers. Feel free to fork and continue development.
To get started complete the following steps below.
$ npm install
All the configuration is stored in config.ts
.
$ npx ts-node get_schema.ts
The default configuration will save the contents in schema.graphql
.
$ npx ts-node get_providermap.ts
The default configuration will save the contents in providermap.json
.
Will print a list of the fields to stdout.
$ npx ts-node stresstest.ts
Will continuously generate random queries and print the results to stdout
.
Kill the process to stop it.