Skip to content
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

Explain the attributes of updateNode. #483

Closed
shahzadlone opened this issue May 27, 2022 · 0 comments · Fixed by #514
Closed

Explain the attributes of updateNode. #483

shahzadlone opened this issue May 27, 2022 · 0 comments · Fixed by #514
Assignees
Labels
area/query Related to the query component feature New feature or request
Milestone

Comments

@shahzadlone
Copy link
Member

Subtask of #35.

Explain the attributes of updateNode.

@shahzadlone shahzadlone added feature New feature or request area/query Related to the query component labels May 27, 2022
@shahzadlone shahzadlone added this to the DefraDB v0.3 milestone May 27, 2022
@shahzadlone shahzadlone self-assigned this May 27, 2022
shahzadlone added a commit that referenced this issue Jun 14, 2022
- Resolves #483 

- Add the attributes for `updateNode` that we want to see in the explainable response.

Request:
```
mutation @Explain {
	update_user(
		ids: [
			"bae-0a24cf29-b2c2-5861-9d00-abd6250c475d",
			"bae-958c9334-73cf-5695-bf06-cf06826babfa"
		],
		data: "{\"points\": 59}"
	) {
		_key
		name
		points
	}
}
```

Response: 
```
"explain": {
	"updateNode": {
		"data": {
			"points": float64(59),
		}
		"filter": nil,
		"ids": []string{
			"bae-0a24cf29-b2c2-5861-9d00-abd6250c475d",
			"bae-958c9334-73cf-5695-bf06-cf06826babfa",
		}
		"selectTopNode": {
			"renderNode": {
				"selectNode": {
					"filter": nil,
					"scanNode": {
						"collectionID":   "1",
						"collectionName": "user",
						"filter":         nil,
						"spans":          []{},
					}
				}
			}
		}
	}
}
```
shahzadlone added a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
)

- Resolves sourcenetwork#483 

- Add the attributes for `updateNode` that we want to see in the explainable response.

Request:
```
mutation @Explain {
	update_user(
		ids: [
			"bae-0a24cf29-b2c2-5861-9d00-abd6250c475d",
			"bae-958c9334-73cf-5695-bf06-cf06826babfa"
		],
		data: "{\"points\": 59}"
	) {
		_key
		name
		points
	}
}
```

Response: 
```
"explain": {
	"updateNode": {
		"data": {
			"points": float64(59),
		}
		"filter": nil,
		"ids": []string{
			"bae-0a24cf29-b2c2-5861-9d00-abd6250c475d",
			"bae-958c9334-73cf-5695-bf06-cf06826babfa",
		}
		"selectTopNode": {
			"renderNode": {
				"selectNode": {
					"filter": nil,
					"scanNode": {
						"collectionID":   "1",
						"collectionName": "user",
						"filter":         nil,
						"spans":          []{},
					}
				}
			}
		}
	}
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/query Related to the query component feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant