Created
April 17, 2022 22:10
-
-
Save colinfwren/fe2de75dd2529e2535bb85ecdedfdb49 to your computer and use it in GitHub Desktop.
Connect a node to another node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Arguments look like | |
{ | |
"where": { | |
"id": "ID of the node to update" | |
}, | |
"update": { | |
"userStories": [ | |
{ | |
"connect": [ | |
{ | |
"where": { | |
"id": "ID of the node to connect" | |
} | |
} | |
] | |
} | |
] | |
} | |
} | |
""" | |
mutation Mutation($where: TestWhere, $update: TestUpdateInput) { | |
updateTests(where: $where, update: $update) { | |
tests { | |
name | |
userStories { | |
name | |
} | |
} | |
} | |
} | |
""" | |
Response looks like | |
{ | |
data: { | |
updateTests: [ | |
{ | |
name: 'Updated test', | |
userStories: [ | |
{ | |
name: 'Linked User Story' | |
} | |
] | |
} | |
] | |
} | |
} | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment