feat: implement backend GraphQL API with complex role-based authoriza…#496
Open
AbuJulaybeeb wants to merge 8 commits into
Open
feat: implement backend GraphQL API with complex role-based authoriza…#496AbuJulaybeeb wants to merge 8 commits into
AbuJulaybeeb wants to merge 8 commits into
Conversation
|
@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! 🚀 |
added 7 commits
May 30, 2026 07:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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