GithubHelp home page GithubHelp logo

lennyburdette / graphql-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from urigo/graphql-cli

0.0 2.0 0.0 949 KB

๐Ÿ“Ÿ Command line tool for common GraphQL development workflows

License: MIT License

JavaScript 0.59% TypeScript 99.41%

graphql-cli's Introduction

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 ๐Ÿ“š

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 ๐Ÿ’š

IvanGoncharov RomanGotsiy schickling kbrandwijk

Help & Community Slack Status

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

Prisma

graphql-cli's People

Contributors

0xcaff avatar akoenig avatar appden avatar cktang88 avatar devanb avatar develomark avatar edsrzf avatar felixfbecker avatar fredyc avatar greenkeeper[bot] avatar ivangoncharov avatar jexp avatar jlengstorf avatar joshkel avatar kbrandwijk avatar kuldar avatar nikolasburk avatar pokorson avatar rarkins avatar renovate-bot avatar renovate[bot] avatar romanhotsiy avatar rricard avatar schickling avatar symm avatar timsuchanek avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.