Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 12 additions & 29 deletions workspaces/leetcode-api/schema.graphql

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

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { z } from "zod";

import { graphqlKindTypeZodType } from "@code-chronicles/util/graphqlKindTypeZodType";
import { isStringEmptyOrWhitespaceOnly } from "@code-chronicles/util/isStringEmptyOrWhitespaceOnly";
import {
type OptionalInsteadOfNullishValues,
removeKeysWithNullishValues,
Expand Down Expand Up @@ -119,7 +120,12 @@ const innerTypeZodType = innerTypeZodTypeBase

const nameAndDescriptionZodType = z.strictObject({
name: z.string(),
description: z.string().nullable(),
description: z
.string()
.nullable()
.transform((desc) =>
desc != null && !isStringEmptyOrWhitespaceOnly(desc) ? desc : undefined,
),
});

export const graphqlTypeZodType = z.record(
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading