-
Notifications
You must be signed in to change notification settings - Fork 4
Do we need direction
in existing PUT /v1/graphs
?
#805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The endpoint accepts an array of connections, and the graph service will convert them into actual graph updates based on whether or not they already exist in the user's graph. One thing we do appear to be missing in |
But we have a connectionType per connection which already captures that sentiment. I'm skeptical why we might need direction. Example: {
"dsnpId": "2",
"connections": {
"data": [
{
"privacyType": "private",
"direction": "connectionTo",
"connectionType": "follow",
"dsnpId": "3"
}
]
},
"graphKeyPairs": [
{
"keyType": "X25519",
"publicKey": "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d",
"privateKey": "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d"
}
],
"webhookUrl": "http://localhost/webhook"
} |
So it appears that the direction might have been defined to be used for removing a connection but I think we might need a better design for Updating the graph export enum Direction {
ConnectionTo = 'connectionTo',
ConnectionFrom = 'connectionFrom',
Bidirectional = 'bidirectional',
Disconnect = 'disconnect',
} |
Ah, I wasn't clear on the context of the question. We probably don't need it, then, in |
I think using the same types as what we defined in graph-SDK might be more intuitive export interface ConnectAction {
type: "Connect";
ownerDsnpUserId: string;
connection: Connection;
dsnpKeys?: DsnpKeys;
}
export interface DisconnectAction {
type: "Disconnect";
ownerDsnpUserId: string;
connection: Connection;
} I'll create a new ticket for that |
Yes. |
No description provided.
The text was updated successfully, but these errors were encountered: