Skip to content

Instantly share code, notes, and snippets.

@colinfwren
Created April 17, 2022 22:10
Show Gist options
  • Save colinfwren/fe2de75dd2529e2535bb85ecdedfdb49 to your computer and use it in GitHub Desktop.
Save colinfwren/fe2de75dd2529e2535bb85ecdedfdb49 to your computer and use it in GitHub Desktop.
Connect a node to another node
"""
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