Skip to content

feat: implement backend GraphQL API with complex role-based authoriza…#496

Open
AbuJulaybeeb wants to merge 8 commits into
SoroLabs:mainfrom
AbuJulaybeeb:feat/issue-451-graphql-auth
Open

feat: implement backend GraphQL API with complex role-based authoriza…#496
AbuJulaybeeb wants to merge 8 commits into
SoroLabs:mainfrom
AbuJulaybeeb:feat/issue-451-graphql-auth

Conversation

@AbuJulaybeeb
Copy link
Copy Markdown
Contributor

Integrated apollo-server-express and graphql into the indexer service.
Implemented auth.js providing JWT token verification and a strict Role Hierarchy (ADMIN, OPERATOR, USER, ANONYMOUS).
Built the schema.js providing queries for tasks, events, and reconciliationLogs, alongside mutations like pauseTask.
Built resolvers.js connected directly to the indexer.db with enforced field-level ownership and role boundaries preventing unauthorized data exposure.
Added a Jest test suite (api.test.js) achieving >90% coverage for the auth.js logic and Context verification.
Wrote extensive operational documentation in GRAPHQL.md.
Why it was done To provide a secure, complex MVP-critical querying interface over the indexed blockchain tasks and events for the SoroTask platform, ensuring strict architectural and security boundary enforcement.

How it was verified

Automated Unit Tests passed successfully for Context initialization and Role checking constraints via Jest.
Manual verification confirms the backend server initializes flawlessly without locking the indexer's internal event polling mechanism.
Closes #451

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@AbuJulaybeeb Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] Build GraphQL API with Complex Authorization Rules

1 participant