Create Linear Feed
User Intent
Operation
Code Example (TypeScript)
import { Graphlit } from 'graphlit-client';
import {
FeedTypes,
FeedServiceTypes,
LinearFeedPropertiesInput,
LinearProjectsInput,
} from 'graphlit-client/dist/generated/graphql-types';
const graphlit = new Graphlit();
const linearKey = process.env.LINEAR_API_KEY!;
// Enumerate projects (teams) in Linear
const projectsResponse = await graphlit.queryLinearProjects({
key: linearKey,
});
const projects = projectsResponse.linearProjects?.results ?? [];
if (projects.length === 0) {
throw new Error('No Linear projects available for the provided API key');
}
const projectIdentifier = projects[0]!;
console.log(`Using Linear project: ${projectIdentifier}`);
const feed = await graphlit.createFeed({
name: 'Product Linear',
type: FeedTypes.Issue,
issue: {
type: FeedServiceTypes.Linear,
linear: {
key: linearKey,
project: projectIdentifier,
readLimit: 100,
includeAttachments: true,
},
},
// Optional: add workflow for content processing
// workflow: { id: workflow.createWorkflow.id }
});Configuration
API Key Setup
Last updated