Query and List Feeds

Feed: Query and List Feeds

User Intent

"I want to list all my feeds or find a specific feed by name"

Operation

  • SDK Method: graphlit.queryFeeds() or graphlit.getFeed()

  • GraphQL: queryFeeds or getFeed query

  • Entity Type: Feed

  • Common Use Cases: List active feeds, find feed by name, check feed status, manage feeds

TypeScript (Canonical)

import { Graphlit } from 'graphlit-client';
import { EntityState, FeedTypes } from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

// Query all feeds
const allFeeds = await graphlit.queryFeeds();

console.log(`Total feeds: ${allFeeds.feeds.results.length}`);

allFeeds.feeds.results.forEach((feed) => {
  console.log(`- ${feed.name} (${feed.type}): ${feed.state}`);
});

// Query specific feed types
const slackFeeds = await graphlit.queryFeeds({
  types: [FeedTypes.Slack],
});

console.log(`\nSlack feeds: ${slackFeeds.feeds.results.length}`);

// Search by name
const docFeeds = await graphlit.queryFeeds({
  search: 'Documentation',
});

console.log(`\nDocumentation feeds: ${docFeeds.feeds.results.length}`);

// Get specific feed by ID
const feedId = 'feed-id-here';
const feed = await graphlit.getFeed(feedId);

console.log(`\nFeed: ${feed.feed.name}`);
console.log(`Type: ${feed.feed.type}`);
console.log(`State: ${feed.feed.state}`);

Query all feeds (snake_case)

all_feeds = await graphlit.queryFeeds()

print(f"Total feeds: {len(all_feeds.feeds.results)}")

for feed in all_feeds.feeds.results: print(f"- {feed.name} ({feed.type}): {feed.state}")

Query by type

slack_feeds = await graphlit.queryFeeds( filter=FeedFilterInput( types=[FeedTypes.Slack] ) )

Get specific feed

feed = await graphlit.getFeed(feed_id) print(f"Feed: {feed.feed.name}")

Parameters

queryFeeds (Optional Filter)

  • types (FeedTypes[]): Filter by feed type

    • SLACK, GOOGLE, RSS, WEB, etc.

  • search (string): Search by feed name

  • states (EntityState[]): Filter by state

    • ENABLED, DISABLED

getFeed (Required)

  • id (string): Feed ID

Response

queryFeeds

getFeed

Developer Hints

Feed States

Important: Disabled feeds don't sync new content. Re-enable with updateFeed().

Find Feed by Name

Filter by Type

Check Feed Details

Variations

1. List All Feeds

Get all feeds:

2. Filter by Type

Only specific feed types:

3. Search by Name

Find feeds matching search:

4. Get Feed Details

Retrieve specific feed:

5. List Active Feeds Only

Filter by state:

6. Feed Inventory Report

Generate feed summary:

Common Issues

Issue: Feed not found error Solution: Verify feed ID is correct. Feed may have been deleted. Use queryFeeds() to list all feeds.

Issue: Search returns no results Solution: Search is case-sensitive. Try partial matches. Use queryFeeds() without filter to see all feeds.

Issue: Wrong feed type returned Solution: Check types filter includes correct FeedTypes enum value.

Issue: Feed appears but no content syncing Solution: Check feed state. If DISABLED, feed is not syncing. Re-enable with updateFeed().

Production Example

Feed management dashboard:

Find and update feed:

Health check script:

Last updated

Was this helpful?