Backend Version Update 1.1.0 - peer-network/peer_backend GitHub Wiki
GraphQL Schema Update Log
1.0.0 -> 1.1.0
Guest Schema Version 1.0.0 → Version 1.1.0
Changes in the Schema
Added Optional Field to RegisterInput
Type Modified: input RegisterInput
Change: A new optional field pkey (String) has been added.
Impact:
Clients can now include pkey (e.g., for public keys or external identifiers) during registration.
Existing implementations remain unaffected as pkey is optional.
Before:
input RegisterInput {
email: String!
password: String!
username: String!
}
After:
input RegisterInput {
email: String!
password: String!
username: String!
pkey: String # Optional field
}
Action Required for Clients
No breaking changes.
If using the register mutation, optionally include pkey in the input if needed.
User Schema Version 1.0.0 → Version 1.1.0
Breaking Changes
Removed Query: followrelations
Impact:
Clients using followrelations to fetch follow relationships must switch to the follows or friends queries.
Modified Mutation createComment Argument Structure
Mutation: createComment
Change: Replaced input: CreateCommentInput! with direct arguments (postid: ID!, parentid: ID, content: String!).
Before:
createComment
( action: CommentsType!,
input:
{ postid: ID!,
parentid: ID,
content: String!
}
): StandardResponse!
After:
createComment
(action: CommentsType!,
postid: ID!,
parentid: ID,
content: String!
): CommentResponse!
Migration: Update client code to pass arguments directly instead of using CreateCommentInput.
Modified Mutation resolveActionPost Argument Order
Mutation: resolveActionPost
Change: Swapped argument order from (postid: ID!, action: ActionType!) to (action: ActionType!, postid: ID!).
Impact: Clients must adjust argument order to avoid errors.
Changed Return Type for userBlock Mutation
Mutation: userBlock
Change: Return type changed from setBlockUseresponse! to DefaultResponse!.
Impact: Clients relying on the setBlockUseresponse structure must adapt to the generic DefaultResponse.
Additions and Non-Breaking Changes
Added Pagination to parentcomments Query
Query: parentcomments
Change: Added offset: Int and limit: Int arguments for pagination.
Before:
parentcomments(parent: ID!): CommentResponse!
After:
parentcomments(parent: ID!, offset: Int, limit: Int): CommentResponse!
New Fields in GetUserInfo Type
Type: GetUserInfo Added Fields:
amountblocked: Int! (number of blocked users)
amountfriends: Int! (number of friends)
Added slug Field to ChatParticipant and Userinfo
Types Modified:
ChatParticipant: Added slug: Int!
Userinfo: Added slug: Int
Enhanced Profile Type
Type: Profile
Added Fields:
slug: Int (user identifier slug)
amountfriends: Int! (total friends count)
Structural Update to UserBlocked Type
Type: UserBlocked
Change: Now uses nested BlockedUser type for blockerid and blockedid fields, providing timestamps.