[PR #25] [MERGED] Insert Topic with owned Note/Link resources #11

Closed
opened 2025-12-29 18:27:45 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/linsa-io/linsa/pull/25
Author: @scotttrinh
Created: 7/3/2023
Status: Merged
Merged: 7/3/2023
Merged by: @nikivdev

Base: mainHead: fixup/add-topics


📝 Commits (7)

  • 143d1e3 Properly insert notes with e.for
  • 4d5f39d Use | null and e.params
  • 15b4725 update schema
  • f4a8ced Await adding user, and reset on sync
  • 8e5b410 Add tsx dev dependency
  • aff83e3 Reference in-repo example docs and provide public
  • 7c4e5ec Use union to do both bulk inserts

📊 Changes

8 files changed (+166 additions, -51 deletions)

View changed files

📝 grafbase/db/dbschema/default.esdl (+4 -4)
📝 grafbase/db/dbschema/migrations/00001.edgeql (+23 -6)
📝 grafbase/db/sync/sync.ts (+2 -2)
📝 grafbase/db/sync/wiki.ts (+6 -7)
📝 grafbase/db/topic.ts (+72 -28)
📝 package.json (+1 -0)
📝 pnpm-lock.yaml (+49 -4)
src/docs/physics/0001.md (+9 -0)

📄 Description

I haven't actually run this query, but did fix the type errors and simplified turning optional .notes in to a valid JSON (in other words null since undefined is not valid JSON syntax).

If this works at runtime, I'll follow up with a version that uses e.params and cleans up some of this inline casting.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/linsa-io/linsa/pull/25 **Author:** [@scotttrinh](https://github.com/scotttrinh) **Created:** 7/3/2023 **Status:** ✅ Merged **Merged:** 7/3/2023 **Merged by:** [@nikivdev](https://github.com/nikivdev) **Base:** `main` ← **Head:** `fixup/add-topics` --- ### 📝 Commits (7) - [`143d1e3`](https://github.com/linsa-io/linsa/commit/143d1e3cad42b61de78e22138679e63214850070) Properly insert notes with `e.for` - [`4d5f39d`](https://github.com/linsa-io/linsa/commit/4d5f39ddd3427e169cded6b0361c9c97c6cb51b5) Use `| null` and `e.params` - [`15b4725`](https://github.com/linsa-io/linsa/commit/15b4725fe9ab326720f841e09e8b822f4263e3cc) update schema - [`f4a8ced`](https://github.com/linsa-io/linsa/commit/f4a8ced8c09e84457b0f37475e19d0e34045d147) Await adding user, and reset on sync - [`8e5b410`](https://github.com/linsa-io/linsa/commit/8e5b410fa1e00938df2fe0be9b40e0c8e1a2d576) Add tsx dev dependency - [`aff83e3`](https://github.com/linsa-io/linsa/commit/aff83e3f03b6f870d00cf2b6e3b34f3b93d5a7ba) Reference in-repo example docs and provide public - [`7c4e5ec`](https://github.com/linsa-io/linsa/commit/7c4e5ec13e1fceda7f29edb5b3ef51d2b136457f) Use `union` to do both bulk inserts ### 📊 Changes **8 files changed** (+166 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `grafbase/db/dbschema/default.esdl` (+4 -4) 📝 `grafbase/db/dbschema/migrations/00001.edgeql` (+23 -6) 📝 `grafbase/db/sync/sync.ts` (+2 -2) 📝 `grafbase/db/sync/wiki.ts` (+6 -7) 📝 `grafbase/db/topic.ts` (+72 -28) 📝 `package.json` (+1 -0) 📝 `pnpm-lock.yaml` (+49 -4) ➕ `src/docs/physics/0001.md` (+9 -0) </details> ### 📄 Description I haven't actually _run_ this query, but did fix the type errors and simplified turning optional `.notes` in to a valid JSON (in other words `null` since `undefined` is not valid JSON syntax). If this works at runtime, I'll follow up with a version that uses `e.params` and cleans up some of this inline casting. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 18:27:45 +01:00
adam closed this issue 2025-12-29 18:27:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/linsa#11