বিজ্ঞপ্তি
সমর্থনের জন্য app.capabilities এবং অনুমতির জন্য app.access ও হোস্টের অনুমতি দেখুন। ব্যবহারের আগে নমুনা মান বদলান।
টাইপ ডেফিনিশন
type Subscription {
notificationCreated: Notification!
notificationUpdated: Notification!
notificationDeleted: Notification!
notificationRefreshed: Boolean!
}
type Mutation {
deleteNotifications(ids: [ID!]!): ActionResult!
replyNotification(id: ID!, actionIndex: Int!, text: String!): Boolean!
}
type Query {
notificationCount(query: String!): Int!
notifications(query: String!, offset: Int!, limit: Int!): [Notification!]!
}
type ActionResult {
affectedCount: Int!
}
scalar Instant
type Notification {
id: ID!
onlyOnce: Boolean!
isClearable: Boolean!
appId: ID!
appName: String!
postedAt: Instant!
silent: Boolean!
title: String!
body: String!
actions: [String!]!
replyActions: [String!]!
}অপারেশন
notificationCreated
নতুন পর্যবেক্ষিত ডিভাইস বিজ্ঞপ্তি পায়।
subscription notificationCreated {
notificationCreated { id onlyOnce isClearable appId appName postedAt silent title }
}notificationUpdated
আপডেট করা ডিভাইস বিজ্ঞপ্তি পায়।
subscription notificationUpdated {
notificationUpdated { id onlyOnce isClearable appId appName postedAt silent title }
}notificationDeleted
সরানো ডিভাইস বিজ্ঞপ্তি পায়।
subscription notificationDeleted {
notificationDeleted { id onlyOnce isClearable appId appName postedAt silent title }
}notificationRefreshed
বর্তমান ডিভাইস বিজ্ঞপ্তির তালিকা রিফ্রেশের সংকেত পায়।
subscription notificationRefreshed {
notificationRefreshed
}deleteNotifications
নির্দিষ্ট বিজ্ঞপ্তির রেকর্ড মুছে দেয় ও প্রভাবিত সংখ্যা জানায়।
mutation deleteNotifications($ids: [ID!]!) {
deleteNotifications(ids: $ids) { affectedCount }
}replyNotification
ইনলাইন-উত্তরের কাজ দিয়ে বিজ্ঞপ্তির উত্তর পাঠায়। উত্তর-সমর্থিত কাজগুলির মধ্যে actionIndex 0 থেকে শুরু।
# `actionIndex` indexes [`Notification::reply_actions`], the
# reply-capable subset — not the plain action list.
mutation replyNotification($id: ID!, $actionIndex: Int!, $text: String!) {
replyNotification(id: $id, actionIndex: $actionIndex, text: $text)
}notificationCount
কোয়েরির সঙ্গে মেলা সংরক্ষিত বিজ্ঞপ্তি গোনে।
query notificationCount($query: String!) {
notificationCount(query: $query)
}notifications
কোয়েরির সঙ্গে মেলা সংরক্ষিত ডিভাইস বিজ্ঞপ্তির এক পাতা পড়ে।
query notifications($query: String!, $offset: Int!, $limit: Int!) {
notifications(query: $query, offset: $offset, limit: $limit) { id onlyOnce isClearable appId appName postedAt silent title }
}