doomemacs/modules/lang/graphql
Henrik Lissner 3ce5d96e0a
bump: :lang
ShuguangSun/ess-view-data@5ec1c7206f -> ShuguangSun/ess-view-data@7dcbd23d4c
agda/agda@0d52fa2217 -> agda/agda@bb9e13d970
ardumont/markdown-toc@d3324cb6bc -> ardumont/markdown-toc@29e5c0f33e
atomontage/xterm-color@ce82e87ea3 -> atomontage/xterm-color@86fab1d247
babashka/neil@0b7373dd1b -> babashka/neil@8d5ccdbd81
clojure-emacs/cider@fb7aa88812 -> clojure-emacs/cider@15bd3b0265
clojure-emacs/clojure-mode@28dc02114a -> clojure-emacs/clojure-mode@4679222109
crystal-lang-tools/emacs-crystal-mode@d913fea6f0 -> crystal-lang-tools/emacs-crystal-mode@559e1d8ff9
davazp/graphql-mode@ee49531935 -> davazp/graphql-mode@ef757c6ce2
emacs-ess/ESS@7b9123669c -> emacs-ess/ESS@f8c464dc1b
emacs-geiser/gauche@9eb8b35f0c -> emacs-geiser/gauche@b8197c6288
emacs-geiser/geiser@43b9a034aa -> emacs-geiser/geiser@8842104d15
emacs-lsp/lsp-treemacs@3e5550f278 -> emacs-lsp/lsp-treemacs@49df7292c5
emacs-php/composer.el@eba6b953a4 -> emacs-php/composer.el@8cb5704edd
emacs-straight/auctex@a6f4741c22 -> emacs-straight/auctex@077874d25a
emacsmirror/cmake-mode@b08b5d9045 -> emacsmirror/cmake-mode@25340a7d12
emacsorphanage/dart-mode@9fbf703e1f -> emacsorphanage/dart-mode@773e9ebc74
emacsorphanage/ox-pandoc@5766c70b6d -> emacsorphanage/ox-pandoc@1caeb56a4b
emacsorphanage/restclient@426507f8f7 -> emacsorphanage/restclient@1800a4e367
erlang/otp@e281016db9 -> erlang/otp@2b2b39797f
fxbois/web-mode@1eb0abb1a9 -> fxbois/web-mode@1e7694aee8
gcv/julia-snail@7b50882f5a -> gcv/julia-snail@5a7e2d479c
godotengine/emacs-gdscript-mode@79739fc80f -> godotengine/emacs-gdscript-mode@248b73b1bd
greghendershott/racket-mode@d98852ef6d -> greghendershott/racket-mode@150b057953
hhvm/hack-mode@0addbff8b6 -> hhvm/hack-mode@86a981bd7b
https://codeberg.org/pranshu/haskell-ts-mode@b7db74c7fe96 -> https://codeberg.org/pranshu/haskell-ts-mode@bf143ee8382f
joaotavora/sly@6a303bae74 -> joaotavora/sly@b01993cf1d
ledger/ledger-mode@1cee636788 -> ledger/ledger-mode@9ab399186f
magit/orgit-forge@15f8e91083 -> magit/orgit-forge@c2116b8701 (v1.1.1)
magit/orgit@e0b3fca9f3 -> magit/orgit@24c8fe48c4 (v2.1.1)
mekeor/nael@101726eb47 -> mekeor/nael@9711443449
minad/org-modern@55b5bbeb1e -> minad/org-modern@9bbc44cc7e
nonsequitur/inf-ruby@b8076aad10 -> nonsequitur/inf-ruby@274398a242
ocaml/dune@a40c461736 -> ocaml/dune@14df34d30d
ocaml/merlin@ecfbed3976 -> ocaml/merlin@a0b096c243
oer/org-re-reveal@72c2463782 -> oer/org-re-reveal@8245facfdc
org-noter/org-noter@aafa08a49c -> org-noter/org-noter@81765d267e
org-roam/org-roam@b2634a17f8 -> org-roam/org-roam@c72702cf27
polymode/polymode@25ba9463a4 -> polymode/polymode@14b1fd8d2a
rust-lang/rust-mode@2d31814676 -> rust-lang/rust-mode@ae161dca23
wbolster/emacs-python-pytest@ed2ecee09d -> wbolster/emacs-python-pytest@78b5ea1d19
weijiangan/flycheck-golangci-lint@38cc30eb8b -> weijiangan/flycheck-golangci-lint@f7e36e19d6

Close: #8624
2026-01-18 03:13:00 -05:00
..
.doommodule feat: add .doommodule files 2024-09-14 20:47:39 -04:00
autoload.el refactor: (if|when)-let -> (if|when)-let* 2025-01-08 19:33:37 -05:00
config.el refactor(:lang): remove fboundp checks for *-ts-modes 2025-09-01 20:11:02 +02:00
doctor.el feat(graphql): add treesit support 2025-08-28 14:32:08 +02:00
packages.el bump: :lang 2026-01-18 03:13:00 -05:00
README.org feat(graphql): add treesit support 2025-08-28 14:32:08 +02:00

:lang graphql

Description   unfold

This module adds GraphQL support to Doom Emacs.

It includes:

  • Code completion
  • LSP support (doom-module:+lsp)

    • Diagnostics (GraphQL syntax linting/validations) (spec-compliant)
    • Autocomplete suggestions (spec-compliant)
    • Hyperlink to fragment definitions and named types (type, input, enum) definitions (spec-compliant)
    • Outline view support for queries and SDL
    • Symbols support across the workspace
  • Local schema viewer
  • Org-babel exporter (requires doom-module::lang org)

Module flags

+lsp
Enable LSP support for graphql-mode. Requires doom-module::tools lsp and a langserver (graphql-language-service-cli).
+tree-sitter
Leverages tree-sitter for better syntax highlighting and structural text editing. Requires doom-module::tools tree-sitter.

Hacks

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

LSP

This module has no direct requirements, but the +lsp flag requires a supported LSP server.

Formatter

Formatting is handled using the doom-module::editor format module via prettier.

Usage

Sending queries

When visiting a graphql buffer, you have access to the ability to send the current query with C-c C-c which will prompt you for an optional variables file, then execute the query and return a buffer of the results.

It's also possible to send queries using org-babel using a block such as the ones below (executing correctly will require :lang org)

{
    "continentCode": "AF"
}
query GetContinents($continentCode: String!) {
  continent(code: $continentCode) {
    name
    code
  }
}
{
  "data": {
    "continent": {
      "name": "Africa",
      "code": "AF"
    }
  }
}

Viewing docs

With this module, there are 3 ways to view schemas:

  • +graphql-doc-open-config which uses a local .graphqlconfig file to seed endpoints to query
  • graphql-doc which prompts you to select an endpoint based on ones added manually by graphql-doc-add-api
  • graphql-doc-open-url which prompts to manually enter an endpoint url

When using the doc viewer, there are a few bindings for navigating around.

Key Command Description
C-j forward-button Follow a forward button
C-k backward-button Follow a backward button
<backspace> graphql-doc-go-back Go back to a previous page
mouse-1 - Follow the next label under point
RET - Follow the next label under point

Configuration

Most of the "magic" in the module relies on a properly configured .graphqlconfig file, so follow the examples linked to create an appropriate setup.

LSP configuration is handled through GraphQL Config to handle custom directives/documents/validation etc.

These files will also be useful to other editors, so it would be worth checking them into version control.

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?