You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The REST API is comprehensive but GraphQL would allow frontend clients to request exactly the data they need, reducing over-fetching and under-fetching. Implement a GraphQL endpoint at /graphql using Apollo Server or express-graphql, with resolvers for the most-used data types: courses, credentials, user profiles, and enrollments.
Definition of Done
Apollo Server (or express-graphql) integrated with Express
GraphQL schema defined for: User, Course, Credential, Enrollment, Achievement, Analytics
Description
The REST API is comprehensive but GraphQL would allow frontend clients to request exactly the data they need, reducing over-fetching and under-fetching. Implement a GraphQL endpoint at
/graphqlusing Apollo Server or express-graphql, with resolvers for the most-used data types: courses, credentials, user profiles, and enrollments.Definition of Done
Acceptance Criteria
POST /graphqlaccepts queries and returns properly shaped JSON/graphqlworks in dev modeFiles to Modify
backend/package.json— add apollo-server-express, graphql, dataloaderbackend/src/graphql/schema.ts— GraphQL schema definitionbackend/src/graphql/resolvers.ts— resolversbackend/src/graphql/context.ts— auth contextbackend/src/index.ts— mount Apollo middlewarebackend/middleware/rateLimit.ts— add GraphQL rate limit tier