diff --git a/src/common/schema/organizations.ts b/src/common/schema/organizations.ts index 7e9bde274..f9b02f065 100644 --- a/src/common/schema/organizations.ts +++ b/src/common/schema/organizations.ts @@ -39,16 +39,18 @@ export const organizationSubscriptionFlagsSchema = z.object({ }); const linksSchemaBase = { - title: z.string(), + title: z.string().nullable(), link: z.url(), }; export const organizationLinksSchema = z.discriminatedUnion('type', [ z.object({ type: z.literal(OrganizationLinkType.Social), - socialType: z.enum(SocialMediaType, { - error: 'Invalid social media type', - }), + socialType: z + .enum(SocialMediaType, { + error: 'Invalid social media type', + }) + .nullable(), ...linksSchemaBase, }), z.object({ diff --git a/src/schema/opportunity.ts b/src/schema/opportunity.ts index 56f1fe45e..b2a9d3c92 100644 --- a/src/schema/opportunity.ts +++ b/src/schema/opportunity.ts @@ -389,7 +389,7 @@ export const typeDefs = /* GraphQL */ ` input OrganizationLinkInput { type: OrganizationLinkType! socialType: SocialMediaType - title: String! + title: String link: String! }