core/schema/mutation.graphql

79 lines
2.9 KiB
GraphQL
Raw Normal View History

2024-02-02 12:03:44 +00:00
type Mutation {
2025-07-01 09:18:24 +00:00
# Auth mutations
login(email: String!, password: String!): AuthResult!
logout: AuthSuccess!
refreshToken: AuthResult!
registerUser(email: String!, password: String, name: String): AuthResult!
sendLink(email: String!, lang: String, template: String): Author!
confirmEmail(token: String!): AuthResult!
getSession: SessionInfo!
changePassword(oldPassword: String!, newPassword: String!): AuthSuccess!
resetPassword(token: String!, newPassword: String!): AuthSuccess!
requestPasswordReset(email: String!, lang: String): AuthSuccess!
updateSecurity(
email: String
old_password: String
new_password: String
): SecurityUpdateResult!
confirmEmailChange(token: String!): SecurityUpdateResult!
cancelEmailChange: SecurityUpdateResult!
2025-05-16 06:23:48 +00:00
2025-07-01 09:18:24 +00:00
# author
rate_author(rated_slug: String!, value: Int!): CommonResult!
update_author(profile: ProfileInput!): CommonResult!
2024-02-02 12:03:44 +00:00
2025-07-01 09:18:24 +00:00
# draft
create_draft(draft_input: DraftInput!): CommonResult!
update_draft(draft_id: Int!, draft_input: DraftInput!): CommonResult!
delete_draft(draft_id: Int!): CommonResult!
# publication
publish_shout(shout_id: Int!): CommonResult!
publish_draft(draft_id: Int!): CommonResult!
unpublish_draft(draft_id: Int!): CommonResult!
unpublish_shout(shout_id: Int!): CommonResult!
2024-02-02 12:03:44 +00:00
2025-07-01 09:18:24 +00:00
# follower
follow(what: FollowingEntity!, slug: String!): AuthorFollowsResult!
unfollow(what: FollowingEntity!, slug: String!): AuthorFollowsResult!
2024-02-02 12:03:44 +00:00
2025-07-01 09:18:24 +00:00
# topic
create_topic(topic_input: TopicInput!): CommonResult!
update_topic(topic_input: TopicInput!): CommonResult!
delete_topic(slug: String!): CommonResult!
delete_topic_by_id(id: Int!): CommonResult!
merge_topics(merge_input: TopicMergeInput!): CommonResult!
set_topic_parent(topic_id: Int!, parent_id: Int): CommonResult!
2024-02-02 12:03:44 +00:00
2025-07-01 09:18:24 +00:00
# reaction
create_reaction(reaction: ReactionInput!): CommonResult!
update_reaction(reaction: ReactionInput!): CommonResult!
delete_reaction(reaction_id: Int!): CommonResult!
2024-02-02 12:03:44 +00:00
2025-07-01 09:18:24 +00:00
# collab
create_invite(slug: String, author_id: Int): CommonResult!
remove_author(slug: String, author_id: Int): CommonResult!
remove_invite(invite_id: Int!): CommonResult!
accept_invite(invite_id: Int!): CommonResult!
reject_invite(invite_id: Int!): CommonResult!
2024-03-04 07:35:33 +00:00
2025-07-01 09:18:24 +00:00
# bookmark
toggle_bookmark_shout(slug: String!): CommonResult!
2024-10-21 07:52:23 +00:00
2025-07-01 09:18:24 +00:00
# notifier
notification_mark_seen(notification_id: Int!, seen: Boolean): CommonResult!
notifications_seen_after(after: Int!, seen: Boolean): CommonResult!
notifications_seen_thread(thread_id: String!, seen: Boolean): CommonResult!
2024-10-21 13:42:30 +00:00
2025-07-01 09:18:24 +00:00
# community
join_community(slug: String!): CommonResult!
leave_community(slug: String!): CommonResult!
create_community(community_input: CommunityInput!): CommonResult!
update_community(community_input: CommunityInput!): CommonResult!
delete_community(slug: String!): CommonResult!
2025-06-30 18:46:53 +00:00
2025-07-01 09:18:24 +00:00
# collection
create_collection(collection_input: CollectionInput!): CommonResult!
update_collection(collection_input: CollectionInput!): CommonResult!
delete_collection(slug: String!): CommonResult!
2024-02-02 12:03:44 +00:00
}