Feeds (RSS)
Check app.capabilities for feature support and app.access plus host permissions for authorization. Examples use synthetic values; replace paths, IDs, inputs and filters before calling.
Type Definitions
type Subscription {
feedsFetched: FeedSyncChange!
}
type Mutation {
createFeed(url: String!, fetchContent: Boolean!, name: String): Feed!
deleteFeed(id: ID!): Boolean!
deleteFeedEntries(query: String!): ActionResult!
importFeeds(content: String!): Boolean!
markFeedEntriesRead(query: String!, read: Boolean!): ActionResult!
syncFeedEntryContent(id: ID!): FeedEntry!
syncFeeds(id: ID): Boolean!
updateFeed(id: ID!, name: String, fetchContent: Boolean, url: String): Feed!
}
type Query {
exportFeeds: String!
feed(id: ID!): Feed
feedEntries(query: String!, offset: Int!, limit: Int!): [FeedEntry!]!
feedEntry(id: ID!): FeedEntry
feedEntryCount(query: String!): Int!
feedEntryCounts: [FeedEntryCount!]!
feedSyncStates: [FeedSyncState!]!
feeds: [Feed!]!
fetchFeedTitle(url: String!): String!
}
type ActionResult {
affectedCount: Int!
}
enum DataType {
DEFAULT
AUDIO
VIDEO
IMAGE
SMS
CONTACT
NOTE
FEED_ENTRY
CALL
PACKAGE
FILE
APP_FILE
DOC
}
type Feed {
id: ID!
name: String!
url: String!
fetchContent: Boolean!
logo: String!
lastSyncAt: Instant
lastError: FeedError!
createdAt: Instant!
updatedAt: Instant!
}
type FeedEntry {
id: ID!
title: String!
url: String!
image: String!
description: String!
author: String!
content: String!
feedId: ID!
rawId: String!
read: Boolean!
publishedAt: Instant!
createdAt: Instant!
updatedAt: Instant!
tags: [Tag!]!
feed: Feed
}
type FeedEntryCount {
feedId: ID!
count: Int!
}
type FeedError {
code: FeedErrorCode!
detail: String!
}
enum FeedErrorCode {
NONE
TIMEOUT
SERVER
DNS
PARSE
UNKNOWN
}
type FeedSyncChange {
feedId: ID!
error: String
canceled: Boolean
}
type FeedSyncState {
feedId: ID!
taskId: ID!
revision: Long!
status: FeedWorkerStatus!
error: String!
}
enum FeedWorkerStatus {
QUEUED
RUNNING
CANCELED
COMPLETED
ERROR
}
scalar Instant
scalar Long
type Tag {
id: ID!
name: String!
type: DataType!
count: Int!
}Operations
feedsFetched
Receive feed synchronization changes.
subscription feedsFetched {
feedsFetched { feedId error canceled }
}createFeed
Subscribe to a feed and queue its initial synchronization.
mutation createFeed($url: String!, $fetchContent: Boolean!, $name: String) {
createFeed(url: $url, fetchContent: $fetchContent, name: $name) { id name url fetchContent logo lastSyncAt createdAt updatedAt }
}deleteFeed
Unsubscribe from a feed and delete all its entries (and their tag relations).
mutation deleteFeed($id: ID!) {
deleteFeed(id: $id)
}deleteFeedEntries
Delete feed entries matching a query (and their tag relations).
mutation deleteFeedEntries($query: String!) {
deleteFeedEntries(query: $query) { affectedCount }
}importFeeds
Import an OPML document (as a string) into the feeds database.
mutation importFeeds($content: String!) {
importFeeds(content: $content)
}markFeedEntriesRead
Mark matching feed entries as read or unread and report the affected count.
mutation markFeedEntriesRead($query: String!, $read: Boolean!) {
markFeedEntriesRead(query: $query, read: $read) { affectedCount }
}syncFeedEntryContent
Fetch and save the full content of one feed entry.
mutation syncFeedEntryContent($id: ID!) {
syncFeedEntryContent(id: $id) { id title url image description author content feedId }
}syncFeeds
Queue synchronization of one feed by ID, or all feeds when no ID is supplied.
mutation syncFeeds($id: ID) {
syncFeeds(id: $id)
}updateFeed
Update a feed's display name or fetchContent flag.
mutation updateFeed($id: ID!, $name: String, $fetchContent: Boolean, $url: String) {
updateFeed(id: $id, name: $name, fetchContent: $fetchContent, url: $url) { id name url fetchContent logo lastSyncAt createdAt updatedAt }
}exportFeeds
Export all subscribed feeds as an OPML string.
query exportFeeds {
exportFeeds
}feed
Read one feed subscription by ID; return null when it is absent.
query feed($id: ID!) {
feed(id: $id) { id name url fetchContent logo lastSyncAt createdAt updatedAt }
}feedEntries
Search feed entries (title + description). Leave query empty to list all.
query feedEntries($query: String!, $offset: Int!, $limit: Int!) {
feedEntries(query: $query, offset: $offset, limit: $limit) { id title url image description author content feedId }
}feedEntry
Fetch a single feed entry by ID.
query feedEntry($id: ID!) {
feedEntry(id: $id) { id title url image description author content feedId }
}feedEntryCount
Count feed entries matching a query.
query feedEntryCount($query: String!) {
feedEntryCount(query: $query)
}feedEntryCounts
Read feed-entry count summaries.
query feedEntryCounts {
feedEntryCounts { feedId count }
}feedSyncStates
Read the current synchronization state of feed subscriptions.
query feedSyncStates {
feedSyncStates { feedId taskId revision status error }
}feeds
List all subscribed feeds.
query feeds {
feeds { id name url fetchContent logo lastSyncAt createdAt updatedAt }
}fetchFeedTitle
Fetch the feed title from its URL without adding a subscription.
query fetchFeedTitle($url: String!) {
fetchFeedTitle(url: $url)
}