npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@jwalsh/graphql-cli

v0.0.1

Published

GraphQL CLI

Downloads

5

Readme

graphql-cli

npm version CircleCI

📟 Command line tool for common GraphQL development workflows

Features

  • Helpful commands to improve your workflows like get-schema, diff & playground
  • Compatible with editors and IDEs based on graphql-config
  • Powerful plugin system to extend graphql-cli with custom commands

You can see it in action here:

demo

Note: The graphql-cli has a different use case than the Graphcool CLI. Graphcool CLI is specific to the Graphcool Framework, while graphql-cli can be used with any GraphQL project.

Install

You can simply install the CLI using npm or yarn by running the following command. This will add the graphql (and shorter gql) binary to your path.

npm install -g graphql-cli

Docs :books:

Check out the detailed docs about the possible workflows here.

Usage

Usage: graphql [command]

Commands:
  graphql create [directory]             Bootstrap a new GraphQL project
  graphql add-endpoint                   Add new endpoint to .graphqlconfig
  graphql add-project                    Add new project to .graphqlconfig
  graphql get-schema                     Download schema from endpoint
  graphql schema-status                  Show source & timestamp of local schema
  graphql ping                           Ping GraphQL endpoint
  graphql query <file>                   Run query/mutation
  graphql diff                           Show a diff between two schemas
  graphql playground                     Open interactive GraphQL Playground
  graphql lint                           Check schema for linting errors
  graphql prepare                        Bundle schemas and generate bindings
  graphql codegen [--target] [--output]  Generates apollo-codegen
                                         code/annotations from your
                                         .graphqlconfig

Options:
  --dotenv       Path to .env file                                      [string]
  -p, --project  Project name                                           [string]
  -h, --help     Show help                                             [boolean]
  -v, --version  Show version number                                   [boolean]

Examples:
  graphql init                 Interactively setup .graphqlconfig file
  graphql get-schema -e dev    Update local schema to match "dev" endpoint
  graphql diff -e dev -t prod  Show schema diff between "dev" and "prod"
                               endpoints

For more information go to https://github.com/graphql-cli/graphql-cli

Initial setup and schema download

Listen to schema changes

Autocompletion setup

To install autocompletion in your terminal run

graphql completion >> ~/.bashrc

or on OSX

graphql completion >> ~/.bash_profile

Plugins

Do you want to create your own plugin? Here is a simple example.

Contributors

A big thank you to all contributors and supporters of this repository 💚

Help & Community Slack Status

Join our Slack community if you run into issues or have questions. We love talking to you!