graphql-testgen
TypeScript icon, indicating that this package has built-in type declarations

0.0.15 • Public • Published

Graphql API-tests generator

Based on your schema.

🚧 Early development stage

Commands

graphql-testgen gen 

Arguments

flags arguments alias description
--config path -c Path to config file an example is displayed at Configuration

usage: -c __tests__/api/testgen.js
default: ./testgen.js
--schema -s path to schema file or url path to schema

usage: -s __tests__/api/schema.graphql
default: http://localhost:3000/graphql
--output -o path to output

usage: -o __tests__/generated/
default: __tests__/generated/
--mocks -m path to mocks

usage: -m __test__/mocks
default: __tests__/api/mocks
--append -a - append to existing files

usage: -a
default: false

Configuration

Configuration file testgen.js

module.exports = {
  schemaPath: 'http://localhost:3000/graphql',
  outputDir: '__tests__/generated/',
  mockDir: '__tests__/api/mocks/',
  depth: 4,
}

Readme

Keywords

none

Package Sidebar

Install

npm i graphql-testgen

Weekly Downloads

7

Version

0.0.15

License

ISC

Unpacked Size

436 kB

Total Files

162

Last publish

Collaborators

  • cursedmun