-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph.toml
116 lines (107 loc) · 2.05 KB
/
graph.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[operations]
QUERY_GET_GRAPH = """
query getGraph($fgId: ID!) {
factorgraphs (where: {id: $fgId}) {
label
createdTimestamp
namespace
}
}
"""
MUTATION_ADD_GRAPH = """
mutation addGraph(
$orgId: ID = ""
$id: ID = "",
$label: String = "",
$description: String = "",
$metadata: String = "",
$_version: String = "",
) {
addFactorgraphs(
input: {id: $id, label: $label, _version: $_version, description: $description, metadata: $metadata, org: {connect: {where: {node: {id: $orgId}}}}}
) {
factorgraphs {
label
createdTimestamp
namespace
}
}
}
"""
MUTATION_DELETE_GRAPH = """
mutation deleteGraph($id: ID!) {
deleteFactorgraphs(
where: { id: $id }
delete: {
blobEntries: {
where: { node: { parentConnection: {Factorgraph: {node: {id: $id } } } } }
}
}
) {
nodesDeleted
relationshipsDeleted
}
}
"""
QUERY_LIST_GRAPHS = """
query listGraphs($id: ID!) {
orgs(where: {id: $id}) {
fgs {
label
}
}
}
"""
QUERY_GET_GRAPH_METADATA = """
query getGraphMetadata($id: ID!) {
factorgraphs(where: {id: $id}) {
metadata
}
}
"""
MUTATION_SET_GRAPH_METADATA = """
mutation setGraphMetadata($id: ID!, $meta: String!) {
updateFactorgraphs(
where: { id: $id }
update: { metadata: $meta }
) {
factorgraphs {
metadata
}
}
}
"""
GQL_CONNECT_GRAPH_TO_MODEL = """
mutation connectGraphModel($modelId: ID!, $fgId: ID!) {
updateModels(
where: { id: $modelId }
update: { fgs: { connect: { where: { node: { id: $fgId } } } } }
) {
info {
relationshipsCreated
}
}
}
"""
GQL_CONNECT_GRAPH_TO_AGENT = """
mutation connectGraphModel($agentId: ID!, $fgId: ID!) {
updateAgents(
where: { id: $agentId }
update: { fgs: { connect: { where: { node: { id: $fgId } } } } }
) {
info {
relationshipsCreated
}
}
}
"""
QUERY_GET_GRAPHS_AGENTS = """
query getAgents_Graph($id: ID!) {
factorgraphs(where: {id: $id}) {
agents {
label
namespace
}
}
}
"""