Ciak
06/09/2022, 1:09 PM"Type '{ myAuthorizer: { type: string; function: sst.Function; resultsCacheTtl: string; }; }' is not assignable to type 'undefined'.
here you have the code:
const api = new sst.GraphQLApi(this, "apollo-api", {
server: fun,
authorizers: {
myAuthorizer: {
type: "lambda",
function: new sst.Function(this, "Authorizer", {
handler: "src/authorizer.main",
}),
resultsCacheTtl: "30 seconds",
},
}
});
Frank
const api = new sst.GraphQLApi(stack, "Api", {
authorizers: {
myAuthorizer: {
type: "lambda",
function: new sst.Function(stack, "Authorizer", {
handler: "src/lambda.main"
}),
resultsCacheTtl: "30 seconds",
}
},
defaults: {
authorizer: "myAuthorizer"
},
server: "src/apollo/graphql.handler",
});
Very similar to what u had.Frank
Ciak
06/10/2022, 8:12 AM