Skip to content

Implement GraphQL API as an alternative to REST endpoints #482

Description

@Abdulazeem-code

Description

Add a GraphQL API layer to allow flexible querying for the frontend, alongside the existing REST endpoints.

Proposed Solution

Integrate Apollo Server with Express. Define a GraphQL schema that mirrors the Prisma schema, and write resolvers that utilize the existing database services.

Acceptance Criteria

  • Apollo Server configured and attached to Express
  • Queries and Mutations implemented for core entities
  • Authentication context properly passed to resolvers

Suggested Implementation Areas

src/server.js, src/graphql/ (new directory)

Impact

Improves frontend performance by preventing over-fetching and under-fetching of data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions