Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-auto-query

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-auto-query

Automatic generation of GraphQL queries from GraphQL schemas

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
259
decreased by-16.99%
Maintainers
0
Weekly downloads
 
Created
Source

graphql-auto-query

This project automatically generates GraphQL queries from GraphQL schemas.

schema.graphql -> query.graphql

usage

USAGE[option] <path>
ARGUMENTS<path>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));

Keywords

FAQs

Package last updated on 15 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc