add some more docs
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Michael Zhang 2023-04-18 23:26:51 -05:00
parent df707c95eb
commit 7ba7d7334e
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
3 changed files with 48 additions and 0 deletions

View file

@ -139,3 +139,44 @@
- Subset of React components to typecheck against
- Aggregated queries and group by? Joins?
- Middleware interface / higher-order nodes
- the idea would be it would be solely dependent on / modify another
- i think this would also want to pair with some notion of app-private nodes
- for example, use cases would be:
- version control?
- update "hook" for this would create a third node and append it
```
const newPrev = new Node()
newPrev.prev = curr.prev
curr.prev = newPrev
```
creates like a linked list of version updates
- Pub/Sub?
- i think this could use the same interface as the query interface, so you
would just "listen" to updates there, rather than just getting a single
snapshot of it
- findNodes interface:
- Params
- mode, one of "single", "many", "stream"
- single: return a single document
- many: return many documents (may limit with take)
- TODO: what does a cursor look like?
- stream: open a socket and keep listening for
- streamType, one of "inserts" or "updates"
- metadata: object
- `{ [keyName] : { has?: boolean, value?: [value], select: boolean } }`
- has means if it's not in there, then filter it out
- value means that if the value's not exactly a match, then filter
it out
- could this include valueMatches, which runs a custom predicate?
- select means should this be included in the result

View file

@ -97,6 +97,8 @@ export class Database {
}
}
// TODO: Notify pubsub streams that this has been created?
return createdNode;
});
}
@ -125,6 +127,8 @@ export class Database {
}
});
// TODO: Notify pubsub streams that this has updated?
return await this.prisma.node.findFirst({
where: { id: request.id },
select: { id: true, label: true, metadata: true },

View file

@ -0,0 +1,3 @@
export default function Calendar() {
return <>Calendar</>;
}