Skip to main content

Interface: ResolverTree

The resolver tree is a two-dimensional object with keys as GraphQL types and GraphQL fields for the first and second dimension (respectively). Values cover information about parsed resolvers.

import { ResolverType, ResolverTree } from "aws-appsync-butler";
const tree: ResolverTree = {
Query: {
getPost: {
typeName: 'Query',
fieldName: 'getPost',
resolverType: ResolverType.Unit,
requestMappingTemplate: {
path: 'vtl/resolvers/Query/getPost/request.vtl',
data: '#returrn({ "id": 1, "title": "Good Soup!" })'
},
responseMappingTemplate: {
path: 'vtl/resolvers/Query/getPost/response.vtl',
data: '$util.toJson($ctx.result)'
},
}
},
Mutation: {}
}

Indexable

โ–ช [typeName: string]: Record<string, ParsedResolverInfo>

Properties

Query

โ€ข Query: Record<string, ParsedResolverInfo>


Mutation

โ€ข Mutation: Record<string, ParsedResolverInfo>