2025-03-27 Graph Use Case/CreateNode: Difference between revisions
Jump to navigation
Jump to search
| Line 237: | Line 237: | ||
"objInstanceFull":{ | "objInstanceFull":{ | ||
"identifiers":{ | "identifiers":{ | ||
}, | }, | ||
"fields":{ | "fields":{ | ||
} | } | ||
}, | }, | ||
"setFieldConditionals":[ // optional default array [ ] | "setFieldConditionals":[ "// optional default array [ ]" | ||
{ | { | ||
"objType":{ | "objType":{ | ||
| Line 250: | Line 249: | ||
}, | }, | ||
"fieldName":"", // fieldName want to set | "fieldName":"", "// fieldName want to set" | ||
"passValue":false, //optional | "passValue":false, "//optional" | ||
"notPassValue":true, // optional | "notPassValue":true, "// optional" | ||
"conditionals":[ | "conditionals":[ | ||
{ | { | ||
"fieldName":"", // field value for check | "fieldName":"", "// field value for check" | ||
"value":"" | "value":"" | ||
} | } | ||
| Line 272: | Line 271: | ||
} | } | ||
], | ], | ||
"deepPathConditional":[ // optional default array [ ] | "deepPathConditional":[ "// optional default array [ ]" | ||
{ | { | ||
{ | { | ||
"condition":"notExist",// | "condition":"notExist","// if true can check || 'exist' equal is false" | ||
"conditionCheck":{ // param it's seems like traversal of getDeepPathSearch | "conditionCheck":{ "// param it's seems like traversal of getDeepPathSearch" | ||
"nodeStructure":{ | "nodeStructure":{ | ||
"objType":{ }, | "objType":{ }, | ||
| Line 291: | Line 290: | ||
}, | }, | ||
"nextPath": {} // if have multiple check | "nextPath": {} "// if have multiple check" | ||
} | } | ||
} | } | ||
| Line 299: | Line 298: | ||
"updatePropertiesOnMatch":false | "updatePropertiesOnMatch":false | ||
}, | }, | ||
"originTimestamp": Date.now() // number | "originTimestamp": Date.now() "// number" | ||
} | } | ||
</source> | </source> | ||
Latest revision as of 08:30, 11 May 2026
Overview
Use Case
CreateNode with identifiers
Example Param
{
"objType":{
"serviceTag": "xxxx",
"objectType": "yyyy",
},
"objInstanceFull":{
"identifiers":{
"xxxx" : "yyyy"
},
"fields":{
// "optional"
"xxxx" : "yyyy"
}
},
"relationships":[],
"originTimestamp": 1234567890,
"settings":{
"updatePropertiesOnMatch": false
}
}
Example Output
{
returnValue: {
queryResult: {
returnCreateNode: {
objType: {
serviceTag: 'xxxx',
objectType: 'yyyy'
},
properties: { //properties }
},
existsNode: { },
userNode: { // if has userNode send to createNode
objType: { serviceTag: 'UserAccount', objectType: 'user' },
properties: { userId: 'xxxx' }
}
}
},
requestParams: {
// return example send param
}
},
status: "string", // "complete' or "error"
errorsFound: [],
graphServiceTag: "GraphHandler"
}
CreateNode with versionedData
Example Param
{
"objType": {
"serviceTag": "xxxx",
"objectType": "yyyy"
},
"objInstanceFull": {
"identifiers": {
"xxxx": "yyyy"
},
"fields": {
"can send all fields of versionedData",
"if send any fields of versionedData will be hook properties then return all "
},
"Relationship": [],
"originTimestamp": 1234567890,
"callingFlow": "string"
}
Exmaple Output
{
returnValue: {
queryResult: {
returnCreateNode: {
objTypes: [
{
serviceTag: "xxxx",
objectType: "yyyy"
}
],
objInstanceFull: {
identifiers: {
//identifiers
},
fields: {
// fields of main node
}
},
existsNode: { },
userNode: {
objTypes: [
{
serviceTag: "UserAccount",
objectType: "user"
}
],
properties: {
userId: "xxxx"
}
},
relationships: []
}
},
requestParams: {
// return example send param
}
},
status: "complete",
errorsFound: [],
graphServiceTag: "GraphHandler"
}
CreateNode with targetNode
Example Param
{
"objType": {
"serviceTag": "xxxx",
"objectType": "yyyy"
},
"objInstanceFull": {
"identifiers": {
"xxxx": "yyyy"
},
"fields": {
"//fields"
}
},
"relationships": [
{
"relType": {
"serviceTag": "xxxx",
"relationshipTag": "yyyy"
},
"relationshipProperties": {
"// optional"
},
"relationshipDirection": "from"
"targetObjType": {
"serviceTag": "xxxx",
"objectType": "yyyy"
},
"targetIdentifiers": {
"xxxx": "yyyy"
}
}
],
"originTimestamp": 1234567890,
"settings": {
"updatePropertiesOnMatch": true
}
}
Exmaple Output
{
returnValue: {
queryResult: {
returnCreateNode: {
objTypes: [
{
serviceTag: "xxxx",
objectType: "yyyy"
}
],
objInstanceFull: {
identifiers: {
//identifiers
},
fields: {
// fields of npde
}
},
existsNode: { },
userNode: {
objTypes: [
{
serviceTag: "UserAccount",
objectType: "user"
}
],
properties: {
userId: "xxxx"
}
},
relationships: [
{
objTypes: [
{ serviceTag: 'string', objectType: 'string' }
],
objInstanceFull: {
identifiers: {
// identifiers
}
},
relType: {
serviceTag: 'string',
relationshipTag: 'rel'
},
relationshipProperties: {
// properties
}
}
]
}
},
requestParams: {
// return example send param
}
},
status: "complete",
errorsFound: [],
graphServiceTag: "GraphHandler"
}
CreateNode with setFieldConditionals and deepPathConditional
- setFieldConditionals is check field in data before set field by conditional
- deepPathConditional is check requiredOncreate node and Relationship exist , before created
{
"objType":{
"serviceTag":"xxx",
"objectType":"yyy"
},
"objInstanceFull":{
"identifiers":{
},
"fields":{
}
},
"setFieldConditionals":[ "// optional default array [ ]"
{
"objType":{
},
"indexValue":{
},
"fieldName":"", "// fieldName want to set"
"passValue":false, "//optional"
"notPassValue":true, "// optional"
"conditionals":[
{
"fieldName":"", "// field value for check"
"value":""
}
]
},
{
// if have multiple check
}
],
"relationships":[
{
"relType":{ },
"relationshipDirection":"",
"targetObjType":{},
"targetIdentifiers":{ }
}
],
"deepPathConditional":[ "// optional default array [ ]"
{
{
"condition":"notExist","// if true can check || 'exist' equal is false"
"conditionCheck":{ "// param it's seems like traversal of getDeepPathSearch"
"nodeStructure":{
"objType":{ },
"fields":{ }
},
"nextPath":{
"relationshipStructure":{
"relType":{
},
"relationshipDirection":""
},
"nodeStructure":{
},
"nextPath": {} "// if have multiple check"
}
}
}
],
"settings":{
"updatePropertiesOnMatch":false
},
"originTimestamp": Date.now() "// number"
}
CreateNode with belongTo
- Params like create basicNode & versionedData but in objectSchema optional has belongTo If in objectSchema have belongTo will create query and return dataStructure of belongTo
- Must send : x-correlation-base-user-id : xxxx AND x-correlation-target-id : yyyy ( identifiers of that node)
CreateNode with extendObjtype
- create objectSchema that have objectType for create main node eg. objectType: objectA then upload To S3
- create objectSchemathat have extendObjtype for existParentNode eg. objectType: objectB then upload To S3
- Send parameter with identifiers’s objectType of extendObjtype for create Node
CreateNode with extendObjtype and targetNode
- create objectSchema that have objectType for create main node eg. objectType: objectA
- createNode extend with relationship that have relationshipSchema : requiredOnCreate = true to targetNode
CreateNode With systemGenerated
- not send userNode or userId when createNode