import { LeylineClient, type ExecuteQueryOutput } from "@operation-leyline/client";
const result: ExecuteQueryOutput = await client.executeQuery({
organizationId,
graphId,
query: "MATCH (n) RETURN n LIMIT 10"
});
from leyline import LeylineClient, ExecuteQueryOutput
result: ExecuteQueryOutput = await client.execute_query(
organization_id=organization_id,
graph_id=graph_id,
query="MATCH (n) RETURN n LIMIT 10"
)
import leyline "github.com/leyline/leyline-go"
var result *leyline.ExecuteQueryOutput
var err error
result, err = client.ExecuteQuery(ctx, &leyline.ExecuteQueryInput{
OrganizationID: organizationID,
GraphID: graphID,
Query: "MATCH (n) RETURN n LIMIT 10",
})
use leyline_sdk::{Client, ExecuteQueryOutput};
let result: ExecuteQueryOutput = client.execute_query()
.organization_id(organization_id)
.graph_id(graph_id)
.query("MATCH (n) RETURN n LIMIT 10")
.send()
.await?;
import com.leyline.sdk.LeylineClient;
import com.leyline.sdk.ExecuteQueryRequest;
import com.leyline.sdk.ExecuteQueryOutput;
ExecuteQueryOutput result = client.executeQuery(
ExecuteQueryRequest.builder()
.organizationId(organizationId)
.graphId(graphId)
.query("MATCH (n) RETURN n LIMIT 10")
.build()
);
using Leyline.Sdk;
ExecuteQueryOutput result = await client.ExecuteQueryAsync(new()
{
OrganizationId = organizationId,
GraphId = graphId,
Query = "MATCH (n) RETURN n LIMIT 10"
});
import dev.leyline.sdk.LeylineClient
import dev.leyline.sdk.ExecuteQueryRequest
import dev.leyline.sdk.ExecuteQueryOutput
val result: ExecuteQueryOutput = client.executeQuery(
ExecuteQueryRequest(
organizationId = organizationId,
graphId = graphId,
query = "MATCH (n) RETURN n LIMIT 10"
)
)
import LeylineSDK
let result: ExecuteQueryOutput = try await client.executeQuery(
organizationId: organizationId,
graphId: graphId,
query: "MATCH (n) RETURN n LIMIT 10"
)
import 'package:leyline/leyline.dart';
final ExecuteQueryOutput result = await client.executeQuery(
organizationId: organizationId,
graphId: graphId,
query: 'MATCH (n) RETURN n LIMIT 10',
);
require "leyline"
# @type var result: Leyline::ExecuteQueryOutput
result = client.execute_query(
organization_id: organization_id,
graph_id: graph_id,
query: "MATCH (n) RETURN n LIMIT 10"
)
<?php
use Leyline\LeylineClient;
use Leyline\ExecuteQueryOutput;
/** @var ExecuteQueryOutput $result */
$result = $client->executeQuery([
'organizationId' => $organizationId,
'graphId' => $graphId,
'query' => 'MATCH (n) RETURN n LIMIT 10',
]);
library(leyline)
# result: ExecuteQueryOutput
result <- client$execute_query(
organization_id = organization_id,
graph_id = graph_id,
query = "MATCH (n) RETURN n LIMIT 10"
)
#include <leyline/client.hpp>
leyline::ExecuteQueryOutput result = client.execute_query({
.organization_id = organization_id,
.graph_id = graph_id,
.query = "MATCH (n) RETURN n LIMIT 10"
});
#include <leyline/client.h>
leyline_execute_query_output result;
leyline_execute_query_input input = {
.organization_id = organization_id,
.graph_id = graph_id,
.query = "MATCH (n) RETURN n LIMIT 10"
};
leyline_execute_query(client, &input, &result);
POST /v1/organizations/{organizationId}/graphs/{graphId}/query HTTP/1.1
Host: api.leylinedb.com
Authorization: Bearer <api-key>
Content-Type: application/json
x-amz-content-sha256: 5d1413dfe5839883b5b04122341e21e5d005e53c80848fc9a4e585012dbdcfff
{
"query": "MATCH (n) RETURN n LIMIT 10"
}
import { Graph } from "@leyline/cdk";
const graph = new Graph(this, "MyGraph", {
organizationId,
name: "my-graph",
});
terraform {
required_providers {
leyline = { source = "leyline/leyline" }
}
}
resource "leyline_graph" "app" {
organization_id = var.organization_id
name = "my-graph"
}