resolver_map.proto

Package: sqoop.solo.io

Types:

Source File: github.com/solo-io/sqoop/api/v1/resolver_map.proto

ResolverMap

The ResolverMap object maps Resolvers to the fields in the GraphQL Schema The skeleton of a Resolver Map will be generated by Sqoop automatically when a schema is read or updated if one does not alreay exist.

"types": map<string, .sqoop.solo.io.TypeResolver>
"status": .core.solo.io.Status
"metadata": .core.solo.io.Metadata
Field Type Description Default
types map<string, .sqoop.solo.io.TypeResolver> Types is a map of Type Names (defined in the schema) to a TypeResolver, which contain resolvers for the specific fields of the type
status .core.solo.io.Status Status indicates the validation status of this resource. Status is read-only by clients, and set by gloo during validation
metadata .core.solo.io.Metadata Metadata contains the object metadata for this resource

TypeResolver

TypeResolver contains the individual resolvers for each field for a specific type

"fields": map<string, .sqoop.solo.io.FieldResolver>
Field Type Description Default
fields map<string, .sqoop.solo.io.FieldResolver> This is a map of Field Names to the resolver that Sqoop should invoke when a query arrives for that field

FieldResolver

Resolvers define the actual logic Sqoop needs to know in order to resolve a specific field query

"glooResolver": .sqoop.solo.io.GlooResolver
"templateResolver": .sqoop.solo.io.TemplateResolver
"nodejsResolver": .sqoop.solo.io.NodeJSResolver
Field Type Description Default
glooResolver .sqoop.solo.io.GlooResolver a GlooResolver, which leverages Gloo to retrieve data from backend services and functions for the query
templateResolver .sqoop.solo.io.TemplateResolver a TemplateResolver, which uses Go Templates to generate data for the query
nodejsResolver .sqoop.solo.io.NodeJSResolver a NodeJSResolver, which calls NodeJS functions to return data for the query

GlooResolver

GlooResolvers are the “meat” of Sqoop. GlooResolvers tell Sqoop how to invoke a “Gloo Function”

"requestTemplate": .sqoop.solo.io.RequestTemplate
"responseTemplate": .sqoop.solo.io.ResponseTemplate
"action": .gloo.solo.io.RouteAction
Field Type Description Default
requestTemplate .sqoop.solo.io.RequestTemplate the Request Template, if specified, will become the body of the HTTP request used to invoke a function through Gloo input parameters, if needed, should be specified in the request template. See Sqoop’s [Resolver documentation] for more information on Request Templates.
responseTemplate .sqoop.solo.io.ResponseTemplate The response template, if specified, will transform the body of HTTP responses returned by Gloo functions. This field should be used if the object returned by the Gloo Function does not match the type specified in the GraphQL schema. It can also be used to modify or transform responses from their original state. See Sqoop’s [Resolver documentation] for more information on Response Templates.
action .gloo.solo.io.RouteAction the routing action to take when resolver is executed. usually this is a Route destination

RequestTemplate

"verb": string
"path": string
"body": string
"headers": map<string, string>
Field Type Description Default
verb string
path string
body string
headers map<string, string>

ResponseTemplate

"body": string
"headers": map<string, string>
Field Type Description Default
body string
headers map<string, string>

TemplateResolver

A Go-template which will return data for a Resolver without making a function call. Template Resolvers can make use of Sqoop’s builtin template functions as well as the data provided by the Params object to the resolver. Read more about Templates and Resolvers in Sqoop\’s [Resolver documentation].

"inlineTemplate": string
Field Type Description Default
inlineTemplate string the Go template as an inline string

NodeJSResolver

NOTE: currently unsupported

"inlineCode": string
Field Type Description Default
inlineCode string