From 0a795eae1af58b903b72a1314c5a89bc4c0f3019 Mon Sep 17 00:00:00 2001 From: Marco Kellershoff Date: Mon, 12 Aug 2024 23:25:20 +0200 Subject: [PATCH] chore(docs): update README --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fa6c2b1..669bf74 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![GitHub release (latest by date)](https://img.shields.io/github/v/release/mistweaverco/kulala-cmp-graphql.nvim?style=for-the-badge)](https://github.com/mistweaverco/kulala-cmp-graphql.nvim/releases/latest) [![Discord](https://img.shields.io/badge/discord-join-7289da?style=for-the-badge&logo=discord)](https://discord.gg/QyVQmfY4Rt) -[Install](#install) • [Configuration](#configuration) +[Install](#install) • [Configuration](#configuration) • [Usage](#usage)

@@ -22,7 +22,6 @@ Kulala is swahili for "rest" or "relax". ![demo](https://github.com/user-attachments/assets/3d3d3a3a-0272-4405-a7e0-7e9b8f03ea88) -

@@ -61,6 +60,19 @@ cmp.setup.filetype("http", { }) ``` +## Usage + +This plugin provides completions for GraphQL queries in `.http`/`.rest` files. + +It depends on a GraphQL schema file in your project which should reside next to your `.http`/`.rest` files. + +The schema file should be named `[http-file-name-without-extension].graphql-schema.json` or `graphql-schema.json`. + +You can download the schema file using [kulala.nvim][kulala] via the +[`:lua require("kulala").download_graphql_schema()`](kulala-dl-gql-schema] command. + [kulala]: https://github.com/mistweaverco/kulala.nvim +[kulala-dl-gql-schema]: https://kulala.mwco.app/docs/usage/public-methods#download_graphql_schema [nvim-cmp]: https://github.com/hrsh7th/nvim-cmp +