aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/snips/ft/yaml.lua
diff options
context:
space:
mode:
authorAriel D'Alessandro <ariel.dalessandro@auto1.com>2022-09-26 09:17:39 +0200
committerAriel D'Alessandro <ariel.dalessandro@auto1.com>2022-09-26 09:18:14 +0200
commitb2ea5bb4976ad786a104d5539d47645ddef237a9 (patch)
tree63ced30c20f1ca65c23a009d316e5d5cbfdef3c4 /lua/alpha/snips/ft/yaml.lua
parent4457e657255ba071497b30356676a42f6f184cdf (diff)
downloadnvim-conf-b2ea5bb4976ad786a104d5539d47645ddef237a9.tar.gz
nvim-conf-b2ea5bb4976ad786a104d5539d47645ddef237a9.zip
Add gateway graphql queries search
Diffstat (limited to 'lua/alpha/snips/ft/yaml.lua')
-rw-r--r--lua/alpha/snips/ft/yaml.lua26
1 files changed, 26 insertions, 0 deletions
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