earthstar-project / earthstar-graphql

Query, sync and set data to earthstar workspaces using GraphQL.
GNU Affero General Public License v3.0
6 stars 1 forks source link

Add `addWorkspace` mutation #4

Closed sgwilym closed 3 years ago

sgwilym commented 3 years ago

Currently adding a workspace to a context can only be done by triggering the sync mutation with an unseen workspace address. This isn't very clear.

Instead, I'd like to add an explicit addWorkspace mutation, which takes an address and optionally an AuthorInput as its arguments (explained below)

As earthstar-graphql can be run within trusted and untrusted environments (ie. in a client or deployed online), the check for whether a workspace can be added needs to be completely configurable.

I am thinking this would be a checking function that you can pass to context, which you could configure with your own block or allowlist, or identities allowed to add workspaces (hence the optional authorinput that can be sent with the mutation).