AppSyncResolver
Reference doc for the `sst.aws.AppSyncResolver` component.
The AppSyncResolver
component is internally used by the AppSync
component to add
resolvers to AWS AppSync.
You’ll find this component returned by the addResolver
method of the AppSync
component.
Constructor
Parameters
-
name
string
-
args
ResolverArgs
-
opts?
ComponentResourceOptions
Properties
nodes
nodes.resolver
Type Resolver
The Amazon AppSync Resolver.
ResolverArgs
apiId
Type Input
<
string
>
The AppSync GraphQL API ID.
code?
Type Input
<
string
>
The function code that contains the request and response functions.
dataSource?
Type Input
<
string
>
The data source this resolver is using. This only applies for unit
resolvers.
field
Type Input
<
string
>
The field name from the schema defined.
functions?
Type Input
<
string
[]
>
The functions this resolver is using. This only applies for pipeline
resolvers.
kind?
Type Input
<
“
unit
”
|
“
pipeline
”
>
Default “unit”
The type of the resolver.
requestTemplate?
Type Input
<
string
>
For unit
resolvers, this is the request mapping template. And for pipeline
resolvers, this is the before mapping template.
responseTemplate?
Type Input
<
string
>
For unit
resolvers, this is the response mapping template. And for pipeline
resolvers, this is the after mapping template.
transform?
transform.resolver?
Type ResolverArgs
|
(
args
:
ResolverArgs
,
opts
:
ComponentResourceOptions
,
name
:
string
)
=>
void
Transform the AppSync Resolver resource.
type
Type Input
<
string
>
The type name from the schema defined.