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

Tests for Multiple Delete Documents Operation #165

Closed
shahzadlone opened this issue Feb 1, 2022 · 0 comments · Fixed by #196
Closed

Tests for Multiple Delete Documents Operation #165

shahzadlone opened this issue Feb 1, 2022 · 0 comments · Fixed by #196
Assignees
Labels
area/testing Related to any test or testing suite

Comments

@shahzadlone
Copy link
Member

No description provided.

@shahzadlone shahzadlone added the area/testing Related to any test or testing suite label Feb 1, 2022
@shahzadlone shahzadlone added this to the DefraDB v0.2.1 milestone Feb 1, 2022
@shahzadlone shahzadlone self-assigned this Feb 1, 2022
shahzadlone added a commit that referenced this issue Feb 15, 2022
)

### ISSUE:

Resolves #164
Resolves #165

### DESCRIPTION:

Adds the ability to delete multiple documents, using multiple ids.

We can now delete multiple documents using multiple dockeys (i.e. ids).

For example:
```
mutation {
    delete_user(ids: ["bae-3a1a496e-24eb-5ae3-9c17-524c146a393e" , "bae-6a6482a8-24e1-5c73-a237-ca569e41507d"]) {
        KeyOfDeletedDocument: _key
    }
}
    
```

Gives this on successful deletion of all documents:
```
{
  "data": [
    {
      "KeyOfDeletedDocument": "bae-3a1a496e-24eb-5ae3-9c17-524c146a393e"
    },
    {
      "KeyOfDeletedDocument": "bae-6a6482a8-24e1-5c73-a237-ca569e41507d"
    }
  ]
}
```


### COMMITS:

* feat: Add implementation for deleting multiple documents.

* test: Add tests for the multiple document deletion using multiple keys.

* refactor: Split tests into seperate files for the deletion mutuation
command.

* fix: suppress linter error.
shahzadlone added a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
…ourcenetwork#196)

### ISSUE:

Resolves sourcenetwork#164
Resolves sourcenetwork#165

### DESCRIPTION:

Adds the ability to delete multiple documents, using multiple ids.

We can now delete multiple documents using multiple dockeys (i.e. ids).

For example:
```
mutation {
    delete_user(ids: ["bae-3a1a496e-24eb-5ae3-9c17-524c146a393e" , "bae-6a6482a8-24e1-5c73-a237-ca569e41507d"]) {
        KeyOfDeletedDocument: _key
    }
}
    
```

Gives this on successful deletion of all documents:
```
{
  "data": [
    {
      "KeyOfDeletedDocument": "bae-3a1a496e-24eb-5ae3-9c17-524c146a393e"
    },
    {
      "KeyOfDeletedDocument": "bae-6a6482a8-24e1-5c73-a237-ca569e41507d"
    }
  ]
}
```


### COMMITS:

* feat: Add implementation for deleting multiple documents.

* test: Add tests for the multiple document deletion using multiple keys.

* refactor: Split tests into seperate files for the deletion mutuation
command.

* fix: suppress linter error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Related to any test or testing suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant