From 9b4eaadc7e463581cf8ce9ef9e88127f8be4d4e3 Mon Sep 17 00:00:00 2001 From: mattgarmon Date: Wed, 4 Aug 2021 15:36:49 -0700 Subject: [PATCH] add graphql function type and selectionSet to functionRef Signed-off-by: mattgarmon --- model/function.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/model/function.go b/model/function.go index 8ea6472..a903384 100644 --- a/model/function.go +++ b/model/function.go @@ -23,6 +23,8 @@ const ( FunctionTypeRPC FunctionType = "rpc" // FunctionTypeExpression ... FunctionTypeExpression FunctionType = "expression" + // FunctionTypeGraphQL ... + FunctionTypeGraphQL FunctionType = "graphql" ) // FunctionType ... @@ -35,7 +37,7 @@ type Function struct { Name string `json:"name" validate:"required"` // If type is `rest`, #. If type is `rpc`, ##. If type is `expression`, defines the workflow expression. Operation string `json:"operation" validate:"required"` - // Defines the function type. Is either `rest`, `rpc` or `expression`. Default is `rest` + // Defines the function type. Is either `rest`, `rpc`, `expression` or `graphql`. Default is `rest` Type FunctionType `json:"type,omitempty"` } @@ -45,6 +47,8 @@ type FunctionRef struct { RefName string `json:"refName" validate:"required"` // Function arguments Arguments map[string]interface{} `json:"arguments,omitempty"` + // String containing a valid GraphQL selection set + SelectionSet string `json:"selectionSet,omitempty"` } // UnmarshalJSON ...