-
Notifications
You must be signed in to change notification settings - Fork 0
Implement Search and Skill detail page #5
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,8 @@ dist-ssr | |
| .vinxi | ||
| __unconfig* | ||
| todos.json | ||
| user.json | ||
| data.txt | ||
|
|
||
| # firebase data connect | ||
| .firebase | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| mutation CreateSkill( | ||
| $authorClerkId: String!, | ||
| $title: String!, | ||
| $description: String!, | ||
| $tags: [String!]!, | ||
| $installCommand: String!, | ||
| $promptConfig: String!, | ||
| $usageExample: String! | ||
| ) @auth(level: PUBLIC insecureReason: "Clerk auth is handled on the frontend") { | ||
| skill_insert( | ||
| data: { | ||
| authorClerkId: $authorClerkId | ||
| title: $title | ||
| description: $description | ||
| tags: $tags | ||
| installCommand: $installCommand | ||
| promptConfig: $promptConfig | ||
| usageExample: $usageExample | ||
| } | ||
| ) | ||
| } | ||
|
Comment on lines
+1
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Block public write + client-controlled author identity. This mutation allows unauthenticated callers to create skills and impersonate any author by sending any 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| query GetSkills($searchTerm: String = "", $limit: Int = 10) @auth(level: PUBLIC insecureReason: "Skills should be visible to everyone") { | ||
| query GetSkills($searchTerm: String = "", $limit: Int = 10, $offset: Int = 0) @auth(level: PUBLIC insecureReason: "Skills should be visible to everyone") { | ||
| skills( | ||
| where: { | ||
| _or: [ | ||
|
|
@@ -10,8 +10,16 @@ query GetSkills($searchTerm: String = "", $limit: Int = 10) @auth(level: PUBLIC | |
| createdAt: DESC | ||
| }], | ||
| limit: $limit | ||
| offset: $offset, | ||
| ) { | ||
| id title description tags createdAt installCommand | ||
| author { username imageUrl clerkId email } | ||
| } | ||
|
Comment on lines
16
to
17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid exposing author email and clerkId in public queries.
Also applies to: 22-23 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| query GetSkillById($id: UUID!) @auth(level: PUBLIC insecureReason: "Skills should be visible to everyone") { | ||
| skill(id: $id) { | ||
| id title description tags installCommand promptConfig usageExample createdAt | ||
| author { username imageUrl clerkId email } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix duplicate section numbering.
Both "Create
firestore.rules" (Line 63) and "Createfirestore.indexes.json" (Line 81) are numbered as "### 3". The indexes section should be "### 4" to maintain correct sequential numbering.📝 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents