Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getFatQuery() {
switch (this.props.parent_type) {
case 'source':
return Relay.QL`fragment on DestroyVersionPayload { deletedId, source { log, log_count } }`;
case 'project_media':
return Relay.QL`fragment on DestroyVersionPayload { deletedId, project_media { log, log_count, last_status, last_status_obj { id } } }`;
default:
return '';
}
}
viewer: () => Relay.QL`
fragment on Viewer {
user {
name
}
}
`,
build: () => Relay.QL`
source: () => Relay.QL`
fragment on ProjectSource {
id,
dbid,
permissions,
source {
id,
dbid,
permissions,
}
}
`,
},
organizationMember: () => Relay.QL`
fragment on OrganizationMember {
id
user {
id
uuid
}
organization {
id
teams(search: $teamAddSearch, first: 10, order: RELEVANCE, user: $userSelector) @include (if: $includeSearchResults) {
edges {
node {
id
${Team.getFragment('team')}
permissions {
teamMemberCreate {
allowed
organization: () => Relay.QL`
fragment on Organization {
slug
agents(last: 1) @include(if: $isMounted) {
count
edges {
node {
name
}
}
}
}
`
}
getMutation() {
return Relay.QL`
mutation {
organizationInvitationResend
}
`;
}
hits: () => Relay.QL`
fragment on AnnotationConnection {
total
edges {
node {
id
${AnnotationTr.getFragment('node')}
}
}
}
`,
},
pipeline: () => Relay.QL`
fragment on Pipeline {
name
${Chooser.getFragment('pipeline')}
organization {
${Row.getFragment('organization')}
}
teams(first: 500) {
edges {
node {
id
${Row.getFragment('teamPipeline')}
}
}
}
}
`
availability: () => Relay.QL`
fragment on ProductAvailabilityType {
available,
discount { gross },
priceRange {
maxPrice { gross, grossLocalized, currency },
minPrice { gross, grossLocalized, currency }
}
}
`
}
import Relay from 'react-relay/classic';
const mediaFragment = Relay.QL`
fragment on ProjectMedia {
id,
dbid,
url,
quote,
published,
updated_at,
metadata,
archived,
relationships { sources_count, targets_count },
relationship {
id
permissions
source { id, dbid }
source_id
target { id, dbid }