Skip to content

enthusiva/gql.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gql.nvim

A Neovim plugin for executing GraphQL queries directly from your editor.

Installation

Use with lazy.nvim:

return {
  'enthusiva/gql.nvim',
  opts = {
    servers = {
        default = {
          url = "https://api.example.com/graphql",
          auth = "Bearer your-token-here" -- Optional
        },
        other_server = {
          url = "https://api.otherserver.com/graphql"
        }
    },
    default_display_mode = 'vertical', --horizontal, vertical, float
  },
  config = function(_, opts)
    -- Check if yq is installed
    if vim.fn.executable 'yq' == 0 then
      vim.notify('yq utility is not installed. Please install yq from (https://github.com/mikefarah/yq) to use YAML configurations.', vim.log.levels.ERROR)
      return
    end
    require('gql').setup(opts)
  end,
  cmd = {"ExecuteQuery","SelectServer"}
}

To-do List

  • Server specific gql params file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages