அறிவிப்புகள்
அம்ச ஆதரவிற்கு app.capabilities-ஐயும் அனுமதிக்கு app.access மற்றும் host அனுமதிகளையும் சரிபார்க்கவும். எடுத்துக்காட்டுகள் செயற்கை மதிப்புகளைப் பயன்படுத்துகின்றன; அழைப்பதற்கு முன் பாதைகள், ID-கள், உள்ளீடுகள் மற்றும் வடிப்பான்களை மாற்றவும்.
வகை வரையறைகள்
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 }
}