Skip to content

Commit

Permalink
fix issues in non root graphql resolvers
Browse files Browse the repository at this point in the history
  • Loading branch information
xoldd committed Jan 2, 2025
1 parent e604d10 commit 87d7116
Show file tree
Hide file tree
Showing 100 changed files with 1,795 additions and 822 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ CREATE TABLE "chat_messages" (
"created_at" timestamp (3) with time zone DEFAULT now() NOT NULL,
"creator_id" uuid,
"id" uuid PRIMARY KEY NOT NULL,
"parent_chat_message_id" uuid,
"parent_message_id" uuid,
"updated_at" timestamp (3) with time zone
);
--> statement-breakpoint
Expand Down Expand Up @@ -128,8 +128,7 @@ CREATE TABLE "comments" (
"creator_id" uuid,
"id" uuid PRIMARY KEY NOT NULL,
"post_id" uuid NOT NULL,
"updated_at" timestamp (3) with time zone,
"updater_id" uuid
"updated_at" timestamp (3) with time zone
);
--> statement-breakpoint
CREATE TABLE "event_attachments" (
Expand Down Expand Up @@ -424,7 +423,7 @@ ALTER TABLE "chat_memberships" ADD CONSTRAINT "chat_memberships_member_id_users_
ALTER TABLE "chat_memberships" ADD CONSTRAINT "chat_memberships_updater_id_users_id_fk" FOREIGN KEY ("updater_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "chat_messages" ADD CONSTRAINT "chat_messages_chat_id_chats_id_fk" FOREIGN KEY ("chat_id") REFERENCES "public"."chats"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "chat_messages" ADD CONSTRAINT "chat_messages_creator_id_users_id_fk" FOREIGN KEY ("creator_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "chat_messages" ADD CONSTRAINT "chat_messages_parent_chat_message_id_chat_messages_id_fk" FOREIGN KEY ("parent_chat_message_id") REFERENCES "public"."chat_messages"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "chat_messages" ADD CONSTRAINT "chat_messages_parent_message_id_chat_messages_id_fk" FOREIGN KEY ("parent_message_id") REFERENCES "public"."chat_messages"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "chats" ADD CONSTRAINT "chats_creator_id_users_id_fk" FOREIGN KEY ("creator_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "chats" ADD CONSTRAINT "chats_organization_id_organizations_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organizations"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "chats" ADD CONSTRAINT "chats_updater_id_users_id_fk" FOREIGN KEY ("updater_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
Expand All @@ -433,7 +432,6 @@ ALTER TABLE "comment_votes" ADD CONSTRAINT "comment_votes_creator_id_users_id_fk
ALTER TABLE "comment_votes" ADD CONSTRAINT "comment_votes_updated_id_users_id_fk" FOREIGN KEY ("updated_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "comments" ADD CONSTRAINT "comments_creator_id_users_id_fk" FOREIGN KEY ("creator_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "comments" ADD CONSTRAINT "comments_post_id_posts_id_fk" FOREIGN KEY ("post_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "comments" ADD CONSTRAINT "comments_updater_id_users_id_fk" FOREIGN KEY ("updater_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "event_attachments" ADD CONSTRAINT "event_attachments_creator_id_users_id_fk" FOREIGN KEY ("creator_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "event_attachments" ADD CONSTRAINT "event_attachments_event_id_events_id_fk" FOREIGN KEY ("event_id") REFERENCES "public"."events"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint
ALTER TABLE "event_attachments" ADD CONSTRAINT "event_attachments_updater_id_users_id_fk" FOREIGN KEY ("updater_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint
Expand Down Expand Up @@ -545,7 +543,7 @@ CREATE INDEX "chat_memberships_role_index" ON "chat_memberships" USING btree ("r
CREATE INDEX "chat_messages_chat_id_index" ON "chat_messages" USING btree ("chat_id");--> statement-breakpoint
CREATE INDEX "chat_messages_created_at_index" ON "chat_messages" USING btree ("created_at");--> statement-breakpoint
CREATE INDEX "chat_messages_creator_id_index" ON "chat_messages" USING btree ("creator_id");--> statement-breakpoint
CREATE INDEX "chat_messages_parent_chat_message_id_index" ON "chat_messages" USING btree ("parent_chat_message_id");--> statement-breakpoint
CREATE INDEX "chat_messages_parent_message_id_index" ON "chat_messages" USING btree ("parent_message_id");--> statement-breakpoint
CREATE INDEX "chats_creator_id_index" ON "chats" USING btree ("creator_id");--> statement-breakpoint
CREATE INDEX "chats_name_index" ON "chats" USING btree ("name");--> statement-breakpoint
CREATE INDEX "chats_organization_id_index" ON "chats" USING btree ("organization_id");--> statement-breakpoint
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "62950bfb-fb43-4883-a2df-9dcc9aaf1687",
"id": "2bd701f6-2186-44c7-93b4-56dc4ce1e21a",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
Expand Down Expand Up @@ -1457,8 +1457,8 @@
"primaryKey": true,
"notNull": true
},
"parent_chat_message_id": {
"name": "parent_chat_message_id",
"parent_message_id": {
"name": "parent_message_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
Expand Down Expand Up @@ -1516,11 +1516,11 @@
"method": "btree",
"with": {}
},
"chat_messages_parent_chat_message_id_index": {
"name": "chat_messages_parent_chat_message_id_index",
"chat_messages_parent_message_id_index": {
"name": "chat_messages_parent_message_id_index",
"columns": [
{
"expression": "parent_chat_message_id",
"expression": "parent_message_id",
"isExpression": false,
"asc": true,
"nulls": "last"
Expand Down Expand Up @@ -1559,12 +1559,12 @@
"onDelete": "set null",
"onUpdate": "cascade"
},
"chat_messages_parent_chat_message_id_chat_messages_id_fk": {
"name": "chat_messages_parent_chat_message_id_chat_messages_id_fk",
"chat_messages_parent_message_id_chat_messages_id_fk": {
"name": "chat_messages_parent_message_id_chat_messages_id_fk",
"tableFrom": "chat_messages",
"tableTo": "chat_messages",
"columnsFrom": [
"parent_chat_message_id"
"parent_message_id"
],
"columnsTo": [
"id"
Expand Down Expand Up @@ -1965,12 +1965,6 @@
"type": "timestamp (3) with time zone",
"primaryKey": false,
"notNull": false
},
"updater_id": {
"name": "updater_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
Expand Down Expand Up @@ -2046,19 +2040,6 @@
],
"onDelete": "cascade",
"onUpdate": "cascade"
},
"comments_updater_id_users_id_fk": {
"name": "comments_updater_id_users_id_fk",
"tableFrom": "comments",
"tableTo": "users",
"columnsFrom": [
"updater_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "cascade"
}
},
"compositePrimaryKeys": {},
Expand Down
4 changes: 2 additions & 2 deletions drizzle_migrations/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
{
"idx": 0,
"version": "7",
"when": 1735648785424,
"tag": "20241231123945_true_dorian_gray",
"when": 1735839408264,
"tag": "20250102173648_nostalgic_vermin",
"breakpoints": true
}
]
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 44 additions & 27 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ type Advertisement {
"""Array of attachments."""
attachments: [AdvertisementAttachment!]

"""Date time at the time the advertisement was first created."""
"""Date time at the time the advertisement was created."""
createdAt: DateTime

"""User who first created the advertisement."""
"""User who created the advertisement."""
creator: User

"""Custom information about the advertisement."""
Expand Down Expand Up @@ -57,10 +57,10 @@ type AgendaFolder {
"""
childFolders(after: String, before: String, first: Int, last: Int): AgendaFolderChildFoldersConnection

"""Date time at the time the agenda folder was first created."""
"""Date time at the time the agenda folder was created."""
createdAt: DateTime

"""User who first created the agenda folder."""
"""User who created the agenda folder."""
creator: User

"""
Expand Down Expand Up @@ -131,7 +131,7 @@ type AgendaItem {
"""Duration of the agenda item."""
duration: String

"""Agenda folder associated to the agenda item."""
"""Agenda folder within which the agenda item in contained."""
event: AgendaFolder

"""Global identifier of the agenda item."""
Expand Down Expand Up @@ -189,7 +189,7 @@ type Chat {
"""Date time at the time the chat was first created."""
createdAt: DateTime

"""User who first created the chat."""
"""User who created the chat."""
creator: User

"""Custom information about the chat."""
Expand Down Expand Up @@ -255,8 +255,8 @@ type ChatMessage {
"""Global identifier of the chat message."""
id: ID!

"""Parent chat message of the chat message."""
parentChatMessage: ChatMessage
"""Parent message of the chat message."""
parentMessage: ChatMessage

"""Date time at the time the chat message was last updated."""
updatedAt: DateTime
Expand Down Expand Up @@ -308,9 +308,6 @@ type Comment {

"""Date time at the time the comment was last updated."""
updatedAt: DateTime

"""User who last updated the comment."""
updater: User
}

""""""
Expand Down Expand Up @@ -367,10 +364,10 @@ type Event {
"""Array of attachments."""
attachments: [EventAttachment!]

"""Date time at the time the event was first created."""
"""Date time at the time the event was created."""
createdAt: DateTime

"""User who first created the event."""
"""User who created the event."""
creator: User

"""Custom information about the event."""
Expand Down Expand Up @@ -439,10 +436,10 @@ type Fund {
"""GraphQL connection to traverse through the campaigns for the fund."""
campaigns(after: String, before: String, first: Int, last: Int): FundCampaignsConnection

"""Date time at the time the fund was first created."""
"""Date time at the time the fund was created."""
createdAt: DateTime

"""User who first created the fund."""
"""User who created the fund."""
creator: User

"""Global identifier of the fund."""
Expand All @@ -465,10 +462,10 @@ type Fund {
}

type FundCampaign {
"""Date time at the time the fund campaign was first created."""
"""Date time at the time the fund campaign was created."""
createdAt: DateTime

"""User who first created the fund campaign."""
"""User who created the fund campaign."""
creator: User

"""Currency code of the fund campaign."""
Expand Down Expand Up @@ -1314,8 +1311,8 @@ input MutationCreateChatMessageInput {
"""Global identifier of the associated chat."""
chatId: ID!

"""Global identifier of the associated parent chat message."""
parentChatMessageId: ID!
"""Global identifier of the associated parent message."""
parentMessageId: ID!
}

""""""
Expand Down Expand Up @@ -2221,7 +2218,7 @@ type Organization {
"""Date time at the time the organization was created."""
createdAt: DateTime

"""User who first created the organization."""
"""User who created the organization."""
creator: User

"""Custom information about the organization."""
Expand Down Expand Up @@ -2450,7 +2447,7 @@ type Post {
"""Date time at the time the post was created."""
createdAt: DateTime

"""User who first created the post."""
"""User who created the post."""
creator: User

"""
Expand Down Expand Up @@ -2721,10 +2718,15 @@ input SubscriptionChatMessageCreateInput {
}

type Tag {
"""Date time at the time the tag was first created."""
"""
GraphQL connection to traverse through the users that are assignees of the tag.
"""
assignees(after: String, before: String, first: Int, last: Int): TagAssigneesConnection

"""Date time at the time the tag was created."""
createdAt: DateTime

"""User who first created the tag."""
"""User who created the tag."""
creator: User

"""Tag folder the tag is contained within."""
Expand All @@ -2746,6 +2748,18 @@ type Tag {
updater: User
}

""""""
type TagAssigneesConnection {
edges: [TagAssigneesConnectionEdge]
pageInfo: PageInfo!
}

""""""
type TagAssigneesConnectionEdge {
cursor: String!
node: User
}

type TagFolder {
"""
GraphQL connection to traverse through the tag folders contained within the tag folder.
Expand All @@ -2755,7 +2769,7 @@ type TagFolder {
"""Date time at the time the tag folder was created."""
createdAt: DateTime

"""User who first created the tag folder."""
"""User who created the tag folder."""
creator: User

"""Global identifier of the tag folder."""
Expand Down Expand Up @@ -2831,7 +2845,7 @@ type User {
"""Date time at the time the user was created."""
createdAt: DateTime

"""User who first created the user."""
"""User who created the user."""
creator: User

"""Custom information about the user."""
Expand Down Expand Up @@ -2958,10 +2972,13 @@ enum UserRole {
}

type Venue {
"""Date time at the time the venue was first created."""
"""Array of attachments."""
attachments: [VenueAttachment!]

"""Date time at the time the venue was created."""
createdAt: DateTime

"""User who first created the venue."""
"""User who created the venue."""
creator: User

"""Custom information about the venue."""
Expand Down
Loading

0 comments on commit 87d7116

Please sign in to comment.