- Updated the path display names are taken from to one that can only be edited by the author themselves, and renamed the file too.
- Added a
isPub
option that can be provided when creating a context, which makes selections of the rootauthors
,documents
, andworkspaces
fields return empty arrays.
syncWithPub
(which synced a workspace with a single pub), andsyncMany
(which synced many workspaces with many pubs) have been removed in favour of a singlesyncWithPubs
mutation which syncs a single workspace with many pubs. I think this is the sweet spot.
- Added a
removeWorkspace
mutation which removes a workspace with a given address from the context. It can be authorised using acanRemoveWorkspace
checking function provided to the schema. - When a workspace with an invalid address is created during the
addWorkspace
,syncWithPub
, orsyncMany
mutations, the error will be gracefully caught and made part of the expected GraphQL response.
- Fixes an issue where no value could be passed to a non-nullable filed when syncing.
- Fixes bad values being passed to the pulled documents in a DetailedSyncSuccess
- Fix a silly bug where a workspace would be duplicated every time it was synced.
- Added a
syncMany
mutation that lets you sync many workspaces with many pubs in a single operation.
- The
format
arg on thesyncWithPub
mutation has been removed, as whether a pub is a GraphQL or REST pub is now automatically determined.
- Added a
isGraphQlPub
function export which can be used to determine whether the pub at a URL is a GraphQL pub or not. - Added a optional
deletedAfter
arg to theset
mutation so that ephemeral documents can be created - If the workspace passed to a
syncWithPub
mutation does not exist,syncWithPub
will create it if it passes the configurablecanAddWorkspace
check.
- earthstar dependency updated to 5.2.3
- earthstar moved into peer dependencies, as clients which may also depend on the earthstar package should use the same version.
- Added a
displayName
field to theAuthor
type, which returns the display name set by the author at a particular path in a workspace (see https://github.com/earthstar-project/earthstar/blob/master/docs/vocabulary.md#author)
- Fixed an issue where deleted documents would not be synced during push or pull.
- Added a
includeDeleted
field to all document querying fields, which returns deleted documents (which as of now is when a document's content is an empty string) when true.
- Fixed an issue where a schema context configured with no sync filters would wrongly respond to queries for its sync filters as empty arrays.
- I think these two should be semantically different: an undefined sync filter means the pub has no preference on documents, whereas an empty one would mean the pub is accepting nothing. (???)
- The
syncWithPub
mutation now returns more results, including a more detailed result type for GraphQL sync which exposes data on all the documents that were pushed and pulled. ES3Document
has been renamed toES4Document
- The
value
field onES4Document
has been replaced bycontent
graphql
is now a peer dependency
DocumentRejectedError
now gives back a reason for why the document was rejected during theset
MutationsyncGraphql
now returns a detailed report of the documents pushed and pulledES4Document
now hasdeleteAfter
andcontentHash
fields
- Added a GraphQL SDL of the current schema to src/schema.graphql
- Added ts-graphql-plugin so TS can validate queries against our schema
- Added automatically generated TS types for GraphQL queries in this codebase
- Added a Github action for validating GraphQL queries in the codebase
- Refactored how mutations are organised
- The
make***Context
functions have been replaced by a singlecreateContext
function - The
sync
mutation has been renamed tosyncWithPub
, and its return type has changed
- Added a
syncGraphql
export which syncs a localIStorage
with a publicly accessible earthstar-graphql server - Added a
ingestDocuments
mutation - Added a
addWorkspace
mutation which uses the schema context'scanAddWorkspace
option to authorise new additions - Added more arguments to plural documents fielding to allow filtering, e.g. documents with a certain path prefix
- Added a
syncFilters
field that indicates the kinds of documents the current context is interested in
- Added an example usage of the
query
export
- Added a
dev
command that starts up a GraphQL server which restarts whenever changes are made - Added server mocking for
syncGraphql
tests
- Removed the
makeServer
export, given how easy it is to construct servers using theschema
export, and given how huge (and hard to work with) the package was by includingapollo-server
as a dependency.
- Make
query
export able to describe type of returned data
- Fix a problem where synced workspaces were not properly persisted to context
- Add note to docs that syncing and setting data are done via the GraphQL API (#3)
- Improve naming of certain arguments (#2)
- Removed
apollo-server
as a dependency - Removed
@nexus/schema
as a dependency, and usegraphql-js
to define the schema instead