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

Persons

Create, manage and query Persons.

Last updated 1 year ago

Was this helpful?

Overview

Persons (people) entities describe a living, deceased or fictional person, as defined by . Persons are specified by their name, or optionally their given (first) and family (last) names. They can optionally contain an email address, as well.

Persons are not unique by name, across the Graphlit project, but if an email address is specified, they are unique by email address.

Operations

Create Person

The createPerson mutation enables the creation of a person by accepting the person name. It returns essential details, including the ID and name of the newly generated person.

Mutation:

mutation CreatePerson($person: PersonInput!) {
  createPerson(person: $person) {
    id
    name
  }
}

Variables:

{
  "person": {
    "email": "kirk.marple@gmail.com",
    "givenName": "Kirk",
    "familyName": "Marple",
    "name": "Kirk Marple"
  }
}

Response:

{
  "id": "d1fb910f-4902-44ce-95b9-1e23d85e7573",
  "name": "Kirk Marple"
}
Update Person

The updatePerson mutation enables the updating of a person by accepting the person name.

Mutation:

mutation UpdatePerson($person: PersonUpdateInput!) {
  updatePerson(person: $person) {
    id
    name
  }
}

Variables:

{
  "person": {
    "email": "kirk@unstruk.com",
    "givenName": "Kirk",
    "familyName": "Marple",
    "id": "d1fb910f-4902-44ce-95b9-1e23d85e7573",
    "name": "Kirk Marple"
  }
}

Response:

{
  "id": "d1fb910f-4902-44ce-95b9-1e23d85e7573",
  "name": "Kirk Marple"
}
Delete Person

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

Mutation:

mutation DeletePerson($id: ID!) {
  deletePerson(id: $id) {
    id
    state
  }
}

Variables:

{
  "id": "d1fb910f-4902-44ce-95b9-1e23d85e7573"
}

Response:

{
  "id": "d1fb910f-4902-44ce-95b9-1e23d85e7573",
  "state": "DELETED"
}
Delete Persons

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

Mutation:

mutation DeletePersons($ids: [ID!]!) {
  deletePersons(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 Person

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

Query:

query GetPerson($id: ID!) {
  person(id: $id) {
    id
    name
    email
    givenName
    familyName
  }
}

Variables:

{
  "id": "d1fb910f-4902-44ce-95b9-1e23d85e7573"
}

Response:

{
  "email": "kirk@unstruk.com",
  "givenName": "Kirk",
  "familyName": "Marple",
  "id": "d1fb910f-4902-44ce-95b9-1e23d85e7573",
  "name": "Kirk Marple"
}
Query Persons

Query Persons

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

Query:

query QueryPersons($filter: PersonFilter!) {
  persons(filter: $filter) {
    results {
      id
      name
    }
  }
}

Variables:

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

Response:

{
  "results": [
    {
      "id": "d1fb910f-4902-44ce-95b9-1e23d85e7573",
      "name": "Kirk Marple"
    }
  ]
}

Query Persons By Name

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

Query:

query QueryPersons($filter: PersonFilter!) {
  persons(filter: $filter) {
    results {
      id
      name
      email
      givenName
      familyName
    }
  }
}

Variables:

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

Response:

{
  "results": [
    {
      "email": "kirk@unstruk.com",
      "givenName": "Kirk",
      "familyName": "Marple",
      "id": "d1fb910f-4902-44ce-95b9-1e23d85e7573",
      "name": "Kirk Marple"
    }
  ]
}

Query Persons By Email

The persons query allows you to retrieve persons based on a specific filter criteria, via the email parameter. In this example, the email is set to "unstruk.com", and will find any emails with that domain. It returns a list of person results containing the ID, names and email for each matching person.

Query:

query QueryPersons($filter: PersonFilter!) {
  persons(filter: $filter) {
    results {
      id
      name
      email
      givenName
      familyName
    }
  }
}

Variables:

{
  "filter": {
    "email": "unstruk.com",
    "offset": 0,
    "limit": 100
  }
}

Response:

{
  "results": [
    {
      "email": "kirk@unstruk.com",
      "givenName": "Kirk",
      "familyName": "Marple",
      "id": "d1fb910f-4902-44ce-95b9-1e23d85e7573",
      "name": "Kirk Marple"
    }
  ]
}

Schema.org

Queries

Mutations

Objects

Query Persons
Query Persons By Name
Query Persons By Email