GraphQL Schema Overview - peer-network/peer_backend GitHub Wiki
📬 GraphQL Schema Overview
This page documents the structure of the GraphQL API exposed by the Peer Network backend.
The API is split across three separate schemas:
- Guest (unauthenticated access)
- User (authenticated users)
- Admin (moderator or privileged users)
Each schema defines its own set of queries and mutations for specific use cases.
schemaguest.graphl
)
🔐 Guest Schema (Accessible without logging in. Used for registration, login, token refresh, password reset, and support contact.
✅ Queries
hello: HelloResponse
✅ Mutations
register(input: RegistrationInput!): RegisterResponse!
verifyAccount(userid: ID!): verifyAccount!
login(email: String!, password: String!): AuthPayload!
requestPasswordReset(email: String!): StandardResponse
resetPassword(token: String!, password: String!): StandardResponse
refreshToken(refreshToken: String!): AuthPayload!
contactus(name: String!, email: String!, message: String!): StandardResponse!
schema.graphl
)
👤 User Schema (Used by authenticated users. Powers all user-facing functionality like content, comments, messaging, wallet, etc.
✅ Queries
hello: HelloResponse!
searchUser(...)
listUsers(...)
getProfile(...)
listFollowRelations(...)
listFriends(...)
getUserInfo
listBlockedUsers(...)
listPosts(...)
getPostInfo(postid: ID!)
getCommentInfo(commentId: ID!)
listChildComments(...)
listTags(...)
searchTags(...)
getChat(...)
listChats(...)
listChatMessages(...)
getDailyFreeStatus
balance
listWinLogs(...)
listPaymentLogs(...)
listTodaysInteractions
✅ Mutations
updateUsername(username: String!, password: String!): DefaultResponse!
updateEmail(email: String!, password: String!): DefaultResponse!
updatePassword(password: String!, expassword: String!): DefaultResponse!
updateBio(biography: String!): DefaultResponse!
updateProfileImage(img: String!): DefaultResponse!
toggleUserFollowStatus(userid: ID!): FollowStatusResponse!
toggleBlockUserStatus(userid: ID!): DefaultResponse!
deleteAccount(password: String!): DefaultResponse!
createChat(input: ChatInput!): AddChatResponse!
updateChatInformations(input: UpdateChatInput!): AddChatResponse!
addChatParticipants(input: ChatParticipantsInput!): AddChatResponse!
removeChatParticipants(input: ChatParticipantsInput!): AddChatResponse!
sendChatMessage(chatid: ID!, content: String!): AddChatmessageResponse!
deleteChatMessage(chatid: ID!, messid: Int!): DefaultResponse!
deleteChat(id: ID!): DefaultResponse!
createChatFeed(input: FeedInput!): AddPostResponse!
likeComment(commentid: ID!): DefaultResponse!
reportComment(commentid: ID!): DefaultResponse!
deletePost(id: ID!): DefaultResponse!
createPost(action: PostType!, input: PostInput!): PostResponse!
createComment(action: CommentType!, postid: ID!, parentid: ID, content: String!): CommentResponse!
resolvePostAction(action: PostActionType!, postid: ID!): DefaultResponse!
resolveTransfer(recipient: ID!, numberoftokens: Int!): DefaultResponse!
✅ Subscriptions
getChatMessages(chatid: ID!): AddChatmessageResponse!
setChatMessages(chatid: ID!, content: String!): AddChatmessageResponse!
admin_schema.graphl
)
🛡 Admin Schema (Extends user schema with moderation, analytics, and full user management functionality.
✅ Queries
hello
searchUser(...)
listUsers(...)
getProfile(...)
listFollowRelations(...)
listFriends(...)
getUserInfo
listBlockedUsers(...)
listPosts(...)
getPostInfo(...)
getCommentInfo(...)
listChildComments(...)
listTags(...)
searchTags(...)
getChat(...)
listChats(...)
listChatMessages(...)
getDailyFreeStatus
listTodaysInteractions
allfriends(...)
balance
listWinLogs(...)
listPaymentLogs(...)
getpercentbeforetransaction(...)
refreshmarketcap
globalwins
gemster
gemsters(...)
liquiditypool(...)
testingpool(...)
postcomments(...)
dailygemstatus
dailygemsresults(...)
✅ Mutations
(Same as user schema — all available)
✅ Subscriptions
getChatMessages(chatid: ID!): AddChatmessageResponse!
setChatMessages(chatid: ID!, content: String!): AddChatmessageResponse!
🔗 Related Pages
- 🔧 Backend
- 📓 Changelogs