Phil Astle
08/13/2021, 10:49 AMFrank
Phil Astle
08/13/2021, 5:02 PM// Create a Apollo API
const api = new ApolloApi(this, "Api", {
cors: true,
customDomain,
defaultFunctionProps,
defaultAuthorizationType,
defaultAuthorizer,
server: "graph-server.handler",
});
where the authorization stuff is created like this:
defaultAuthorizationType = ApiAuthorizationType.CUSTOM;
defaultAuthorizer = new HttpLambdaAuthorizer({
authorizerName: "LambdaAuthorizer",
resultsCacheTtl: Duration.seconds(0),
handler: new sst.Function(this, "Authorizer", {
handler: "src/graph/jwt-authorizer.handler",
environment: {
JWT_SECRET_ADMIN: process.env.JWT_SECRET_ADMIN || "",
JWT_SECRET_INTERNAL: process.env.JWT_SECRET_INTERNAL || "",
},
}),
});
We added resultsCacheTtl to get around the fact it wasn't set to 0 and caused crashes.
What we would like to do is use the caching if possible though. Is that not supported by AWS/SST yet @Frank?Frank
resultsCacheTtl
, it’s set to 300s?Frank
Frank
Phil Astle
08/15/2021, 8:14 AMFrank
Frank
Phil Astle
08/16/2021, 11:27 PMFrank
Frank
Frank
Frank
Phil Astle
08/18/2021, 6:25 AMPhil Astle
09/02/2021, 9:54 AM