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

Enable creation of multiple docs through GraphQL #2808

Closed
islamaliev opened this issue Jul 1, 2024 · 0 comments
Closed

Enable creation of multiple docs through GraphQL #2808

islamaliev opened this issue Jul 1, 2024 · 0 comments
Assignees
Labels
area/api Related to the external API component area/collections Related to the collections system
Milestone

Comments

@islamaliev
Copy link
Contributor

At the moment gql only supports creation of a single document at a time.

mutation {
  create_User(input: {name: "John"}) {
    _docID
  }
}

It should be possible to create multiple document, like this:

mutation {
  create_User(inputs: [{name: "John"}, {name: "Fred"}]) {
    _docID
  }
}

Note: creation of multiple documents is already supported through CLI.

@islamaliev islamaliev added area/api Related to the external API component area/collections Related to the collections system labels Jul 1, 2024
@islamaliev islamaliev added this to the DefraDB v0.13 milestone Jul 1, 2024
@islamaliev islamaliev self-assigned this Jul 1, 2024
islamaliev added a commit that referenced this issue Jul 4, 2024
## Relevant issue(s)

Resolves #2711 #2808

## Description

This change introduces doc encryption. Upon creation of a document the
user can pass the encryption flag which will signal to db to create a
new symmetric key using AES-GCM and will store it locally.
With the encryption flag all doc fields (deltas) being stored in the DAG
encrypted. The datastore will still store data as plain text, as for
it's encryption we can use encryption-at-rest.
Decryption is not used at the moment, as it is relevant only p2p
environment and we don't have yet key exchange mechanism. All peers sync
encrypted data.

This PR also adds 2 new parameters to GraphQL `create_` mutation:
1. `inputs`: a list of documents to be created
2. `encrypt`: flag that indicates if document(s) need to be encrypted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Related to the external API component area/collections Related to the collections system
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant