From b2ea5bb4976ad786a104d5539d47645ddef237a9 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Mon, 26 Sep 2022 09:17:39 +0200 Subject: Add gateway graphql queries search --- lua/alpha/snips/ft/yaml.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'lua/alpha/snips') diff --git a/lua/alpha/snips/ft/yaml.lua b/lua/alpha/snips/ft/yaml.lua index 708a67e..27704f9 100644 --- a/lua/alpha/snips/ft/yaml.lua +++ b/lua/alpha/snips/ft/yaml.lua @@ -7,6 +7,7 @@ local d = ls.dynamic_node local f = ls.function_node local i = ls.insert_node local fmt = require("luasnip.extras.fmt").fmt +local rep = require("luasnip.extras").rep local M = { str = fmt([[{}: @@ -85,6 +86,31 @@ properties: i(1, ""), i(2, ""), }), + + mut = fmt([[{}: + type: "{}" + resolve: '@=mutation("App\\GraphQL\\Mutation\\{}::{}", {}, info)' + args: + {} +]], { + i(1, ""), + i(2, ""), + i(3, ""), + rep(1), + i(5, ""), + i(6, ""), + }), + + input = fmt([[{}: + type: input-object + config: + fields: + {} +]], { + i(1, ""), + i(2, ""), + }), + f = fmt([[{}: {{ type: "{}" }}]], {i(1, ""), i(2, "")}), } return M -- cgit v1.2.3