w3-web-svc-learn-vocab
Purpose
Apollo Federation subgraph that exposes a GraphQL API for vocabulary CRUD, backed by AWS API Gateway + Lambda + DynamoDB.
Architecture
- Apollo subgraph with
@apollo/server+@apollo/subgraph. - Loads config from AWS SSM Parameter Store then
.env. - Verifies Cognito JWTs for authenticated requests.
- Uses
API_GATEWAY_LEARN_VOCABas the backend to call Lambda handlers.
GraphQL API
Queries:
learnVocabWords(cognitoId: String!): [LearnVocabWord!]!
Mutations:
learnVocabInsertWords(cognitoId: String!, words: [LearnVocabWordInput!]!): LearnVocabModifyResult!learnVocabRemoveWord(cognitoId: String!, word: String!): LearnVocabModifyResult!
Configuration highlights
AWS_REGIONAPI_GATEWAY_LEARN_VOCABCOGNITO_USER_POOL_ID,COGNITO_CLIENT_IDMONGODB_CONNECTION_STRING,MONGODB_MAX_POOL_SIZE(shared config pattern)