Comment on page
Workflows
Create, manage and query Workflows.
As files, Web pages or RSS posts are ingested into Graphlit, they proceed through several stages of a content workflow.
- Ingestion: Identifying the source content from its original location, and caching it on cloud storage for later processing.
- Indexing: Parsing the source content, and creating technical metadata which describes the content type, file type, file size, and specific properties such as document title, audio duration or image resolution. For some content types, this also includes creating a list of hyperlinks referenced by the source content.
- Preparation: Preparing the cached content for processing by ML models or APIs, by extracting text from documents or Web pages, transcribing audio from media files, or resizing images.
- Extraction: From the extracted document text or audio transcript, identifying named entities such as people, places or organizations, and connecting them with their source content in the Graphlit knowledge graph.
- Enrichment: For extracted entities, enriching their metadata via 3rd party APIs to provide more precise entity resolution and deduplication. For content, optionally ingesting linked content via link crawling.
- Actions: As content proceeds through the workflow, developers can listen on finished and errored events for integrating the Graphlit event-driven workflow with their applications.
When creating workflows, you can assign properties to one or more of the workflow stages. None of the stages are required, and various stages can be combined together into a single workflow.
Metadata indexing is currently a built-in stage, which does not support any configuration by the content workflow.
Once created, workflows can specified with the
createFeed
mutation, or provided with the ingestFile
, ingestPage
or ingestText
mutations, to control how content is ingested and processed into the Graphlit Platform.Also, you can specify the default workflow for a project, which applies to all content, unless otherwise specified by the mutations above.
Entity enrichment is only supported by the default project workflow, because observable entities are not specific to any one piece of content - and are shared across the project.
If entity enrichment is specified within a feed or content workflow stage, it will be ignored during processing.
The
createWorkflow
mutation enables the creation of a workflow by accepting the workflow name
and it returns essential details, including the ID, name and state of the newly generated workflow.Mutation:
mutation CreateWorkflow($workflow: WorkflowInput!) {
createWorkflow(workflow: $workflow) {
id
name
state
}
}
Variables:
{
"workflow": {
"name": "Workflow"
}
}
Response:
{
"id": "8f5e0cff-98dc-44ef-8736-e18670894f6a",
"name": "Workflow",
"state": "ENABLED"
}
The
updateWorkflow
mutation enables the update of a workflow by accepting the workflow id
and optional parameters such as name
. It returns essential details, including the ID, name and state of the newly generated workflow.Mutation:
mutation UpdateWorkflow($workflow: WorkflowUpdateInput!) {
updateWorkflow(workflow: $workflow) {
id
name
state
}
}
Variables:
{
"workflow": {
"id": "8f5e0cff-98dc-44ef-8736-e18670894f6a",
"name": "New Workflow"
}
}
Response:
{
"id": "8f5e0cff-98dc-44ef-8736-e18670894f6a",
"name": "New Workflow",
"state": "ENABLED"
}
If you no longer need a workflow, you can use the
deleteWorkflow
mutation, and pass the ID of the workflow you wish to delete.NOTE: Workflows that are currently in use by a feed, or assigned as the default workflow on a project, cannot be deleted.
Mutation:
mutation DeleteWorkflow($id: ID!) {
deleteWorkflow(id: $id) {
id
state
}
}
Variables:
{
"id": "8f5e0cff-98dc-44ef-8736-e18670894f6a"
}
Response:
{
"id": "8f5e0cff-98dc-44ef-8736-e18670894f6a",
"state": "DELETED"
}
The
workflow
query allows you to retrieve specific details of a workflow by providing the id
parameter, including the ID, name, state, owner ID, and type associated with the workflow.Query:
query GetWorkflow($id: ID!) {
workflow(id: $id) {
id
name
creationDate
owner {
id
}
state
}
}
Variables:
{
"id": "8f5e0cff-98dc-44ef-8736-e18670894f6a"
}
Response:
{
"id": "8f5e0cff-98dc-44ef-8736-e18670894f6a",
"name": "Workflow",
"state": "ENABLED",
"creationDate": "2023-09-05T23:06:15Z",
"owner": {
"id": "530a3721-3273-44b4-bff4-e87218143164"
}
}
The
workflows
query allows you to retrieve all workflows. It returns a list of workflow results, including the ID, name, creation date, state, owner ID, and type for each workflow.Query:
query QueryWorkflows($filter: WorkflowFilter!) {
workflows(filter: $filter) {
results {
id
name
creationDate
owner {
id
}
state
}
}
}
Variables:
{
"filter": {
"id": "8f5e0cff-98dc-44ef-8736-e18670894f6a",
"offset": 0,
"limit": 100
}
}
Response:
{
"results": [
{
"id": "8f5e0cff-98dc-44ef-8736-e18670894f6a",
"name": "Workflow",
"state": "ENABLED",
"creationDate": "2023-09-05T23:06:15Z",
"owner": {
"id": "530a3721-3273-44b4-bff4-e87218143164"
}
}
]
}
Queries
Mutations
Objects
Last modified 2mo ago