Skip to content

Commit

Permalink
update drizzle-zod (#2819)
Browse files Browse the repository at this point in the history
* update drizzle-zod

updated drizzle zod to the latest version and fixed the breaking changes

* fix `/objects/:name` route error handling

* removed custom messages from talawa graphql error instances

* add graphql schema documentation

* fix issues in non root graphql resolvers
  • Loading branch information
xoldd authored Jan 3, 2025
1 parent 9a5a8c6 commit 98670f5
Show file tree
Hide file tree
Showing 295 changed files with 2,325 additions and 2,322 deletions.
12 changes: 6 additions & 6 deletions docs/docs/tutorial-basics/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"label": "Tutorial - Basics",
"position": 2,
"link": {
"type": "generated-index",
"description": "5 minutes to learn the most important Docusaurus concepts."
}
"label": "Tutorial - Basics",
"position": 2,
"link": {
"type": "generated-index",
"description": "5 minutes to learn the most important Docusaurus concepts."
}
}
10 changes: 5 additions & 5 deletions docs/docs/tutorial-extras/_category_.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"label": "Tutorial - Extras",
"position": 3,
"link": {
"type": "generated-index"
}
"label": "Tutorial - Extras",
"position": 3,
"link": {
"type": "generated-index"
}
}
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ajv-formats": "^3.0.1",
"close-with-grace": "^2.1.0",
"drizzle-orm": "^0.38.3",
"drizzle-zod": "0.5.1",
"drizzle-zod": "0.6.1",
"env-schema": "^6.0.0",
"fastify": "^5.2.0",
"fastify-plugin": "^5.0.1",
Expand All @@ -37,7 +37,7 @@
"@faker-js/faker": "^9.3.0",
"@swc/cli": "0.5.2",
"@swc/core": "^1.10.4",
"@types/node": "^22.10.2",
"@types/node": "^22.10.3",
"@vitest/coverage-v8": "^2.1.8",
"drizzle-kit": "^0.30.1",
"gql.tada": "^1.8.10",
Expand Down
68 changes: 34 additions & 34 deletions pnpm-lock.yaml

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

Loading

0 comments on commit 98670f5

Please sign in to comment.