Giter VIP home page Giter VIP logo

graphman's Introduction

GraphMan


Quickly scaffold a postman collection for a GraphQL API.


GraphMan CLI generates an complete collection from a GraphQL endpoint, containing one request per query & mutation, with pre filled fields, parameters and variables.

Note: GraphMan is designed for the postman-collection spec 2.1

✨GraphMan is fully compatible with the Insomnia API Client out of the box!✨

Status

CD Checks

Motivation

Visualizing and exploring existing graphql APIs can be quite daunting. Using postman to manage all your apis is pretty standard, however creating and maintaining collections is difficult. GraphMan makes thoses things easy, helping you for:

  • Graph discovery
  • Graph testing
  • Collection updating

Usage

Run from url

GraphMan uses deno as a javascript / typescript runtime. That allows to run the CLI from the file url. To get started:

  1. Install deno
  2. Run: deno run https://deno.land/x/[email protected]/src/index.ts <graphql endpoint url>
  3. Import the generated [...].postman_collection.json file in postman.

Install GraphMan

If you want to access graphman easly you can "install" it on your machine:

  1. Install deno
  2. Run: deno install -r -f --allow-net --allow-write -n graphman https://deno.land/x/[email protected]/src/index.ts
  3. The command will output export PATH="..." copy paste it in your ~/.bashrc or ~/.zshrc file to add graphman to your path. You can now run graphman using the graphman <params> command! 🎉 To update GraphMan just reproduce the step 2.

Note: this is not a real installation, it just creates a script that basically aliases the run form url command.

Run locally

  1. Clone the repo
  2. Run deno run src/index.ts <params>

Note that deno will ask for network and file-system permissions as it's runtime is secure by default

The relases are mirrored at https://deno.land/x/graphman@VERSION, you can use previous versions if needed.

CLI Options

  • Custom output filename: --out=FILNAME
  • Authorization header: --auth=AUTHORIZATION_HEADER_VALUE
  • Get help: --help or -h

Examples

You can try graphman on public graphql APIs, and it is a great way to get started with graphQL:

  • Rick&Morty API: deno run https://deno.land/x/[email protected]/src/index.ts https://rickandmortyapi.com/graphql
GraphMan collection for the Rick and morty API
Character query for the Rick and morty API collection

Issues and contributions

  • Please open an issue if you encounter bugs, with reproduction steps and error message.
  • For feature requests, please open an issue too
  • Feel free to create merge requests to improve GraphMan !

graphman's People

Contributors

nohehf avatar nullswan avatar notrab avatar lucerowb avatar silval4-ppb avatar

Watchers

 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.