1.0.4 • Published 7 months ago

graphql-auto-query v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

graphql-auto-query

This project automatically generates GraphQL queries from GraphQL schemas.

schema.graphql -> query.graphql

usage

USAGEoption \
ARGUMENTS\url or path of schema.graphql
OPTIONS-d, --depthOutput depth levels (default 2)
-o, --outputoutput file path

CLI

# Standard output from server
graphql-auto-query http://localhost:3000/graphql

# Set output field hierarchy depth to 3
graphql-auto-query http://localhost:3000/graphql -d 3

# File output from local files
graphql-auto-query schema/schema.graphql -o query.graphql

# other
graphql-auto-query https://beta.pokeapi.co/graphql/v1beta -o test/output2.graphql -d 1
graphql-auto-query https://graphqlpokemon.favware.tech/v8 -o test/output3.graphql -d 1

library

import fs from "fs";
import { generate } from "graphql-auto-query";

const schema = fs.readFileSync("schema.graphql", "utf-8");
console.log(generate(schema));
1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

0.0.8

11 months ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago