Graphlit Platform
Developer PortalChangelogPlatform StatusMore InformationJoin Discord
  • Graphlit Platform
    • What is Graphlit?
    • Key Concepts
  • Getting Started
    • Sign up for Graphlit
    • Create Graphlit Project
    • For Python Developers
    • For Node.js Developers
    • For .NET Developers
  • 🚀Quickstart
    • Next.js applications
      • GitHub Code
    • Python applications
      • GitHub Code
  • Graphlit Data API
    • API Usage
      • API Endpoints
      • API Authentication
      • API Explorer
      • GraphQL 101
    • API Reference
      • Content
        • Ingest With Workflow
        • Ingest File
        • Ingest Encoded File
        • Ingest Web Page
        • Ingest Text
        • Semantic Search
          • Query All Content
          • Query Facets
          • Query By Name
          • Filter By Contents
        • Metadata Filtering
          • Filter By Observations
          • Filter By Feeds
          • Filter By Collections
          • Filter By Content Type
          • Filter By File Type
          • Filter By File Size Range
          • Filter By Date Range
        • Summarize Contents
        • Extract Contents
        • Publish Contents
      • Knowledge Graph
        • Labels
        • Categories
        • Persons
        • Organizations
        • Places
        • Events
        • Products
        • Repos
        • Software
      • Collections
      • Feeds
        • Create Feed With Workflow
        • Create RSS Feed
        • Create Podcast Feed
        • Create Web Feed
        • Create Web Search Feed
        • Create Reddit Feed
        • Create Notion Feed
        • Create YouTube Feed
        • User Storage Feeds
          • Create OneDrive Feed
          • Create Google Drive Feed
          • Create SharePoint Feed
        • Cloud Storage Feeds
          • Create Amazon S3 Feed
          • Create Azure Blob Feed
          • Create Azure File Feed
          • Create Google Blob Feed
        • Messaging Feeds
          • Create Slack Feed
          • Create Microsoft Teams Feed
          • Create Discord Feed
        • Email Feeds
          • Create Google Mail Feed
          • Create Microsoft Outlook Feed
        • Issue Feeds
          • Create Linear Feed
          • Create Jira Feed
          • Create GitHub Issues Feed
        • Configuration Options
      • Workflows
        • Ingestion
        • Indexing
        • Preparation
        • Extraction
        • Enrichment
        • Actions
      • Conversations
      • Specifications
        • Azure OpenAI
        • OpenAI
        • Anthropic
        • Mistral
        • Groq
        • Deepseek
        • Replicate
        • Configuration Options
      • Alerts
        • Create Slack Audio Alert
        • Create Slack Text Alert
      • Projects
    • API Changelog
    • Multi-tenant Applications
  • JSON Mode
    • Overview
    • Document JSON
    • Transcript JSON
  • Content Types
    • Files
      • Documents
      • Audio
      • Video
      • Images
      • Animations
      • Data
      • Emails
      • Code
      • Packages
      • Other
    • Web Pages
    • Text
    • Posts
    • Messages
    • Emails
    • Issues
  • Data Sources
    • Feeds
  • Platform
    • Developer Portal
      • Projects
    • Cloud Platform
      • Security
      • Subprocessors
  • Resources
    • Community
Powered by GitBook
On this page
  • Overview
  • Operations

Was this helpful?

  1. Graphlit Data API
  2. API Reference
  3. Knowledge Graph

Products

Create, manage and query Products.

Last updated 1 year ago

Was this helpful?

Overview

Product entities describe any offered product or service, as defined by . Products are specified by their name, and optional .

Products are not unique by name, across the Graphlit project.

Operations

Create Product

The createProduct mutation enables the creation of a product by accepting the product name, uri, manufacturer and sku. It returns essential details, including the ID and name of the newly generated product.

Mutation:

mutation CreateProduct($product: ProductInput!) {
  createProduct(product: $product) {
    id
    name
  }
}

Variables:

{
  "product": {
    "sku": "gpt-35-turbo",
    "manufacturer": "OpenAI",
    "uri": "https://www.openai.com",
    "description": "Large Language Model",
    "name": "GPT-3.5"
  }
}

Response:

{
  "id": "8a32f02a-fa37-4df2-8efb-860a6d566c83",
  "name": "GPT-3.5"
}
Update Product

The updateProduct mutation enables the updating of a product by accepting the product name and other optional fields like sku.

Mutation:

mutation UpdateProduct($product: ProductUpdateInput!) {
  updateProduct(product: $product) {
    id
    name
  }
}

Variables:

{
  "product": {
    "sku": "gpt-4",
    "manufacturer": "OpenAI",
    "uri": "https://www.openai.com",
    "description": "Large Language Model",
    "id": "8a32f02a-fa37-4df2-8efb-860a6d566c83",
    "name": "GPT-4"
  }
}

Response:

{
  "id": "8a32f02a-fa37-4df2-8efb-860a6d566c83",
  "name": "GPT-4"
}
Delete Product

The deleteProduct mutation allows the deletion of a product by utilizing the id parameter, and it returns the ID and state of the deleted product.

Mutation:

mutation DeleteProduct($id: ID!) {
  deleteProduct(id: $id) {
    id
    state
  }
}

Variables:

{
  "id": "8a32f02a-fa37-4df2-8efb-860a6d566c83"
}

Response:

{
  "id": "8a32f02a-fa37-4df2-8efb-860a6d566c83",
  "state": "DELETED"
}
Delete Products

The deleteProducts mutation allows the deletion of multiple products, as specified by the ids array parameter, and it returns the ID and state of the deleted products.

Mutation:

mutation DeleteProducts($ids: [ID!]!) {
  deleteProducts(ids: $ids) {
    id
    state
  }
}

Variables:

{
  "ids": [
    "39fcf408p-15ca-4cc2-9476-622d64aa38f3",
    "93476a0c-d567-4624-9d5e-df43dfff92ea"
  ]
}

Response:

[
  {
    "id": "93476a0c-d567-4624-9d5e-df43dfff92ea",
    "state": "DELETED"
  },
  {
    "id": "39fcf408-15ca-4cc2-9476-622d64aa38f3",
    "state": "DELETED"
  }
]
Get Product

The product query allows you to retrieve specific details of a product by providing the id parameter.

Query:

query GetProduct($id: ID!) {
  product(id: $id) {
    id
    name
    manufacturer
    model
    brand
    upc
    sku
    releaseDate
    productionDate
  }
}

Variables:

{
  "id": "8a32f02a-fa37-4df2-8efb-860a6d566c83"
}

Response:

{
  "sku": "gpt-4",
  "manufacturer": "OpenAI",
  "id": "8a32f02a-fa37-4df2-8efb-860a6d566c83",
  "name": "GPT-4"
}
Query Products

Query Products

The products query allows you to retrieve all products. It returns a list of product results, including the ID and name for each product.

Query:

query QueryProducts($filter: ProductFilter!) {
  products(filter: $filter) {
    results {
      id
      name
      manufacturer
      model
      brand
      upc
      sku
      releaseDate
      productionDate
    }
  }
}

Variables:

{
  "filter": {
    "offset": 0,
    "limit": 100
  }
}

Response:

{
  "results": [
    {
      "sku": "gpt-4",
      "manufacturer": "OpenAI",
      "id": "8a32f02a-fa37-4df2-8efb-860a6d566c83",
      "name": "GPT-4"
    }
  ]
}

Query Products By Name

The products query allows you to retrieve products based on a specific filter criteria, via the name parameter. In this example, the name is set to "gpt." It returns a list of product results containing the ID and name for each matching product.

Query:

query QueryProducts($filter: ProductFilter!) {
  products(filter: $filter) {
    results {
      id
      name
      manufacturer
      model
      brand
      upc
      sku
      releaseDate
      productionDate
    }
  }
}

Variables:

{
  "filter": {
    "name": "gpt",
    "offset": 0,
    "limit": 100
  }
}

Response:

{
  "results": [
    {
      "sku": "gpt-4",
      "manufacturer": "OpenAI",
      "id": "8a32f02a-fa37-4df2-8efb-860a6d566c83",
      "name": "GPT-4"
    }
  ]
}

Schema.org
SKU

Queries

Mutations

Objects

Query Products
Query Products By Name