Michael Orcutt
07/12/2021, 4:08 PMconst userPool = cognito.UserPool.fromUserPoolArn(
this,
// does this id matter?
'dev-user-pool',
process.env.AWS_USER_POOL_ARN,
)
const api = new sst.AppSyncApi(this, 'v2', {
graphqlApi: {
schema: 'src/schema/schema.graphql',
authorizationConfig: {
defaultAuthorization: {
authorizationType: appsync.AuthorizationType.USER_POOL,
userPoolConfig: {
userPool: userPool,
},
},
},
logConfig: {
excludeVerboseContent: false,
fieldLogLevel: appsync.FieldLogLevel.ALL,
},
},
resolvers: {
'Query projects': 'src/get-projects.main',
'Mutation createProject': 'src/create-project.main',
},
})
Frank
// does this id matter?Nope, for imported constructs, it’s just an id for CDK to reference it internally.
Frank
Frank
sst start
, you should see invocation in your terminal when querying from the AppSync console.Michael Orcutt
07/12/2021, 6:06 PMsst start
and we cannot see any logs showing that the resolver func has been calledFrank
authorizationConfig
(ie. making the API public) and see if querying works from the console?Michael Orcutt
07/12/2021, 6:55 PMFrank
Michael Orcutt
07/12/2021, 6:59 PMMichael Orcutt
07/12/2021, 7:01 PMFrank
Michael Orcutt
07/12/2021, 9:14 PMus-east-1
and our Cognito user pool was in us-east-2
Michael Orcutt
07/12/2021, 9:14 PMFrank