GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nxtcoder17/http-cli: tool to make rest and graphql calls from command line or from your editor itself

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
lua/http-cli
lua/http-cli
 
 
pkg
pkg
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
Taskfile.yml
Taskfile.yml
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
main.go
main.go
 
 

Repository files navigation

http client to speed up GraphQL/rest api development

demo

How to Use (with neovim)

  • if you use packer
  use({
    "nxtcoder17/http-cli",
    run = "pnpm i",  -- npm i, as per your choice
    config = function()
      require("http-cli").setup()
    end,
  })
  • default config
local defaultConfig = {
	command = "Gql",
	envFile = function()
		return string.format("%s/%s", vim.env.PWD, "gqlenv.yml")
	end,
}

How to Use

  • You should create a gqlenv.yml file in your project root directory, something like this
mode: dev
map:
  dev:
    url: <endpoint>
    headers:
      k1: v1
      k2: v2
  • then, create a file $filename.yml file
# filename: auth-graphql.yml
---
global:
  email: "[email protected]"

---
query: |
  mutation Login($email: String!, $password: String!) {
    auth {
      login(email: $email, password: $password) {
        id
        userId
        userEmail
      }
    }
  }

variables:
  email: "{{email}}" # this is variable parsing, from either 'gqlenv.json' or from 'global' doc at the top
  password: "hello"  
  • now, execute it
go run ./main.go -- $filename $envFileName $lineNumber
  • you need to have a variable url either in one of the mode vars or global vars

Inspired By

.http file based REST Client in Neovim/vim and Intellij

Next To Come

  • Neovim plugin that could just setup the previous step for you
  • i don't know yet 😂

About

tool to make rest and graphql calls from command line or from your editor itself

Resources

Readme
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.