npm.io
1.0.9 • Published 5 years agoCLI

generate-query-graphql

Licence
ISC
Version
1.0.9
Deps
8
Size
31 kB
Vulns
0
Weekly
0

generate-query-graphql

It will help generate query for graphql, help you working CRUD faster

Currently version, i only apply with Hasura

Installation

npm install generate-query-graphql [--only=dev]

Usage

We can use command line or file yaml config to generate query

  1. Command line
gengq --graphqlUrl https://demo.hasura.io/v1/graphql --secret demo --destDirPath hasura
  1. File config The first thing, you should create file config with name gengq.yaml at root path project This is a example content inside file config
schema:
	graphqlUrl: https://demo.hasura.io/v1/graphql
	secret: demo
	destDirPath: hasura

I will explain some concept right here about config to run generate

graphqlUrl: url graphql of instance Hasura

secret: secret of instance Hasura

destDirPath: the path of destination that you want to generate here

Keywords