Skip to main content

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_VOCAB as 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_REGION
  • API_GATEWAY_LEARN_VOCAB
  • COGNITO_USER_POOL_ID, COGNITO_CLIENT_ID
  • MONGODB_CONNECTION_STRING, MONGODB_MAX_POOL_SIZE (shared config pattern)