Organizations
Create, manage and query Organizations.
Last updated
Was this helpful?
Create, manage and query Organizations.
Last updated
Was this helpful?
Organization entities describe a corporation, school or club, as defined by . Organizations are specified by their name.
Organizations are not unique by name, across the Graphlit project.
The createOrganization
mutation enables the creation of an organization by accepting the organization name
. It returns essential details, including the ID and name of the newly generated organization.
Mutation:
mutation CreateOrganization($organization: OrganizationInput!) {
createOrganization(organization: $organization) {
id
name
}
}
Variables:
{
"organization": {
"uri": "https://www.openai.com",
"name": "OpenAI"
}
}
Response:
{
"id": "34b210b5-f253-4b16-9c63-e56d5546fbcd",
"name": "OpenAI"
}
The updateOrganization
mutation enables the updating of an organization by accepting the organization name
.
Mutation:
mutation UpdateOrganization($organization: OrganizationUpdateInput!) {
updateOrganization(organization: $organization) {
id
name
}
}
Variables:
{
"organization": {
"description": "Developer of LLMs like GPT-3.5.",
"id": "34b210b5-f253-4b16-9c63-e56d5546fbcd",
"name": "OpenAI"
}
}
Response:
{
"id": "34b210b5-f253-4b16-9c63-e56d5546fbcd",
"name": "OpenAI"
}
The deleteOrganization
mutation allows the deletion of an organization by utilizing the id
parameter, and it returns the ID and state of the deleted organization.
Mutation:
mutation DeleteOrganization($id: ID!) {
deleteOrganization(id: $id) {
id
state
}
}
Variables:
{
"id": "34b210b5-f253-4b16-9c63-e56d5546fbcd"
}
Response:
{
"id": "34b210b5-f253-4b16-9c63-e56d5546fbcd",
"state": "DELETED"
}
The deleteOrganizations
mutation allows the deletion of multiple organizations, as specified by the ids
array parameter, and it returns the ID and state of the deleted organizations.
Mutation:
mutation DeleteOrganizations($ids: [ID!]!) {
deleteOrganizations(ids: $ids) {
id
state
}
}
Variables:
{
"ids": [
"39fcf408-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"
}
]
The organization
query allows you to retrieve specific details of an organization by providing the id
parameter.
Query:
query GetOrganization($id: ID!) {
organization(id: $id) {
id
name
}
}
Variables:
{
"id": "34b210b5-f253-4b16-9c63-e56d5546fbcd"
}
Response:
{
"id": "34b210b5-f253-4b16-9c63-e56d5546fbcd",
"name": "OpenAI"
}
Query Organizations
The organizations
query allows you to retrieve all organizations. It returns a list of organization results, including the ID and name for each organization.
Query:
query QueryOrganizations($filter: OrganizationFilter!) {
organizations(filter: $filter) {
results {
id
name
}
}
}
Variables:
{
"filter": {
"offset": 0,
"limit": 100
}
}
Response:
{
"results": [
{
"id": "aae003c5-1e4e-4fe7-94f9-51f8cd5f5de5",
"name": "Facebook"
},
{
"id": "9b1b5a85-096d-4cd3-83b9-1cefacf47e0a",
"name": "Nvidia"
},
{
"id": "d90ee8d7-85d3-4f02-b9c4-35524a329bda",
"name": "Looker"
},
{
"id": "cb1061a2-8ff2-4f5a-a99d-835f2e232286",
"name": "Slack"
},
{
"id": "3c99a619-4afc-4916-b6e9-b3dcf79bc1c9",
"name": "Atlan"
},
{
"id": "b049ff83-1d81-4f73-862a-3198f7d32f3e",
"name": "Aetna"
},
{
"id": "a5a5af84-a3a4-4a33-889e-95b613443dd9",
"name": "Snowflake"
},
{
"id": "333cec02-160d-4c3e-bd0a-071b3c5e805b",
"name": "Early Information"
},
{
"id": "2e12b974-2b0e-423e-8614-8208b0a01f0f",
"name": "GPT"
},
{
"id": "f6d8a8eb-e017-4d6c-b1ec-c1233767f212",
"name": "Brasslett"
},
{
"id": "605e0fb5-a92b-4320-b1eb-f61b23a83ad7",
"name": "Stanford"
},
{
"id": "99df607f-d7e5-4916-ac3d-6fbadf7e8f31",
"name": "Twitter"
},
{
"id": "1bb923cb-c576-4ba7-8d0f-8e622bb2d0bb",
"name": "Reddit"
},
{
"id": "e8c4a199-fe1f-4839-906f-0a21021c1948",
"name": "Microsoft"
},
{
"id": "75d6f57e-69d3-4eae-aabe-4289334aaa26",
"name": "LinkedIn"
}
]
}
Query Organizations By Name
The organizations
query allows you to retrieve organizations based on a specific filter criteria, via the name
parameter. In this example, the name
is set to "Microsoft." It returns a list of organization results containing the ID and name for each matching organization.
Query:
query QueryOrganizations($filter: OrganizationFilter!) {
organizations(filter: $filter) {
results {
id
name
}
}
}
Variables:
{
"filter": {
"name": "Microsoft",
"offset": 0,
"limit": 100
}
}
Response:
{
"results": [
{
"id": "e8c4a199-fe1f-4839-906f-0a21021c1948",
"name": "Microsoft"
}
]
}
Queries
Mutations
Objects