Skip to content

Commit

Permalink
Update the QN schema
Browse files Browse the repository at this point in the history
  • Loading branch information
thesan committed Mar 13, 2024
1 parent 5d62726 commit 577afc9
Show file tree
Hide file tree
Showing 14 changed files with 20,353 additions and 18,689 deletions.
18,946 changes: 9,756 additions & 9,190 deletions packages/server/src/common/queries/schema.graphql

Large diffs are not rendered by default.

623 changes: 573 additions & 50 deletions packages/ui/src/common/api/queries/__generated__/baseTypes.generated.ts

Large diffs are not rendered by default.

19,440 changes: 9,997 additions & 9,443 deletions packages/ui/src/common/api/schemas/schema.graphql

Large diffs are not rendered by default.

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

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

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
Expand Up @@ -9,7 +9,8 @@ import { MemberFormFields } from '@/memberships/modals/BuyMembershipModal/BuyMem

import { SocialMediaInput, SocialMediaSelectorList } from './SocialMediaSelector/SocialMediaSelector'

const socialToPlaceholder: Record<Socials, string> = {
// TODO Partial after upgrading @joystream/metadata-protobuf
const socialToPlaceholder: Partial<Record<Socials, string>> = {
HYPERLINK: 'Enter URL',
WECHAT: 'Enter Username',
IRC: 'Enter Username',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { MemberFormFields } from '@/memberships/modals/BuyMembershipModal/BuyMem

import { socialTitle } from '../SocialMediaTile/SocialMediaTile'

const socialToPlaceholder: Record<Socials, string> = {
// TODO Partial after upgrading @joystream/metadata-protobuf
const socialToPlaceholder: Partial<Record<Socials, string>> = {
HYPERLINK: 'Enter URL',
WECHAT: 'Enter Username',
IRC: 'Enter Username',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import { TextMedium } from '@/common/components/typography'
import { BorderRad, Colors } from '@/common/constants'
import { capitalizeFirstLetter } from '@/common/helpers'

export type Socials = keyof typeof MembershipMetadata.ExternalResource.ResourceType
// TODO remove 'GITHUB' and Partial after upgrading @joystream/metadata-protobuf
export type Socials = keyof typeof MembershipMetadata.ExternalResource.ResourceType | 'GITHUB'

export const socialToIcon: Record<Socials, React.ReactElement> = {
export const socialToIcon: Partial<Record<Socials, React.ReactElement>> = {
EMAIL: <EmailIcon />,
TWITTER: <TwitterIcon />,
TELEGRAM: <TelegramIcon />,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/mocks/data/proposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const proposalDetails: Record<ProposalDetailsType, RecursivePartial<ProposalWith
},
UpdateWorkingGroupBudgetProposalDetails: { amount: joy(200), group: workingGroup },
VetoProposalDetails: { proposal: { __typename: 'Proposal', id: '0', title: random.words(4) } },
UpdateGlobalNftLimitProposalDetails: {},
}

export const proposalDetailsMap = mapValues(proposalDetails, (value, key) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/proposals/hooks/useProposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ const usePayloadDataObjectId = (proposal: GetProposalQuery['proposal']): string
variables: { inBlock: inBlock ?? 0, payloadHash: payloadHash ?? '' },
skip: !inBlock || !payloadHash,
})
return data?.channelPayoutsUpdatedEvents[0].payloadDataObjectId
return data?.channelPayoutsUpdatedEvents[0].payloadDataObjectId ?? undefined
}

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

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

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

0 comments on commit 577afc9

Please sign in to comment.