Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!this.props.relay.hasMore() || this.props.relay.isLoading()) {
return;
}
// Fetch the next 10 feed items
this.props.relay.loadMore(2, () => {
// console.log(error);
});
}
}
Vulnerabilities.propTypes = {
data: PropTypes.object,
relay: PropTypes.object,
};
export default createPaginationContainer(
Vulnerabilities,
{
data: graphql`
fragment Vulnerabilities_data on Query @argumentDefinitions(
count: {type: "Int", defaultValue: 25}
cursor: {type: "ID"}
orderBy: {type: "UsersOrdering", defaultValue: ID}
) {
users(
first: $count
after: $cursor
orderBy: $orderBy # Non-pagination variables
) @connection(key: "Pagination_users") {
edges {
node {
id
export const stixDomainEntitiesLinesSearchQuery = graphql`
query StixDomainEntitiesLinesSearchQuery($search: String, $types: [String]) {
stixDomainEntities(search: $search, types: $types) {
edges {
node {
id
name
entity_type
}
}
}
}
`;
const StixDomainEntitiesLines = createPaginationContainer(
StixDomainEntitiesContainer,
{
data: graphql`
fragment StixDomainEntitiesLines_data on Query
@argumentDefinitions(
search: { type: "String" }
count: { type: "Int", defaultValue: 25 }
cursor: { type: "ID" }
orderBy: { type: "StixDomainEntitiesOrdering", defaultValue: "name" }
orderMode: { type: "OrderingMode", defaultValue: "asc" }
) {
stixDomainEntities(
search: $search
first: $count
after: $cursor
orderBy: $orderBy
const resultBatch = this.props.pullRequest.reviews.edges.map(edge => edge.node);
return (
{this.props.children}
);
}
}
export default createPaginationContainer(ReviewSummariesAccumulator, {
pullRequest: graphql`
fragment reviewSummariesAccumulator_pullRequest on PullRequest
@argumentDefinitions(
reviewCount: {type: "Int!"}
reviewCursor: {type: "String"},
) {
url
reviews(
first: $reviewCount
after: $reviewCursor
) @connection(key: "ReviewSummariesAccumulator_reviews") {
pageInfo {
hasNextPage
endCursor
}
this.flatListHeight = height
}}
onContentSizeChange={(_width, height) => {
this.setState({
shouldStickFirstMessageToTop: height < this.flatListHeight,
})
}}
refreshControl={refreshControl}
style={messagesStyles}
ListFooterComponent={}
/>
)
}
}
export default createPaginationContainer(
Messages,
{
conversation: graphql`
fragment Messages_conversation on Conversation
@argumentDefinitions(count: { type: "Int", defaultValue: 10 }, after: { type: "String" }) {
id
internalID
from {
name
email
initials
}
to {
name
initials
}
$orderMode: OrderingMode
$filters: [IntrusionSetsFiltering]
) {
...IntrusionSetsCards_data
@arguments(
search: $search
count: $count
cursor: $cursor
orderBy: $orderBy
orderMode: $orderMode
filters: $filters
)
}
`;
export default createPaginationContainer(
IntrusionSetsCards,
{
data: graphql`
fragment IntrusionSetsCards_data on Query
@argumentDefinitions(
search: { type: "String" }
count: { type: "Int", defaultValue: 25 }
cursor: { type: "ID" }
orderBy: { type: "IntrusionSetsOrdering", defaultValue: "name" }
orderMode: { type: "OrderingMode", defaultValue: "asc" }
filters: { type: "[IntrusionSetsFiltering]" }
) {
intrusionSets(
search: $search
first: $count
after: $cursor
gene: {
mode: string | null
name: string | null
filtered_artworks: {
aggregations: Array<{ slice: string }>
artworks: {
pageInfo: {
hasNextPage: boolean
endCursor: string
}
}
}
}
}
export default createPaginationContainer(
GeneContentsUrl,
{
gene: graphql.experimental`
fragment Contents_gene on Gene
@argumentDefinitions(
count: { type: "Int", defaultValue: 10 }
cursor: { type: "String", defaultValue: "" }
showArtists: { type: "Boolean", defaultValue: true }
sort: { type: "String", defaultValue: "-partner_updated_at" }
for_sale: { type: "Boolean", defaultValue: false }
medium: { type: "String", defaultValue: "*" }
aggregations: { type: "[ArtworkAggregation]", defaultValue: [MEDIUM, TOTAL, PRICE_RANGE, DIMENSION_RANGE] }
price_range: { type: "String", defaultValue: "*" }
dimension_range: { type: "String", defaultValue: "*" }
) {
mode
: joinValues(node.towns.map(({ name }) => name))}
))}
{props.root && props.root.joblistings.edges.length === 0 && (
<h2> Ingen annonser :( </h2>
)}
);
export const JoblistingsList = createPaginationContainer(
ListRenderer,
{
root: graphql`
fragment JoblistingsContainer_root on Query
@argumentDefinitions(
count: { type: "Int", defaultValue: 30 }
cursor: { type: "String" }
type: { type: "String" }
fromYear: { type: "Float" }
toYear: { type: "Float" }
company: { type: "ID" }
towns: { type: "[ID]", defaultValue: [] }
orderBy: { type: "[OrderByJoblistingType]" }
) {
joblistings(
first: $count
t: PropTypes.func,
fld: PropTypes.func,
};
export const addExternalReferencesLinesQuery = graphql`
query AddExternalReferencesLinesQuery(
$search: String
$count: Int!
$cursor: ID
) {
...AddExternalReferencesLines_data
@arguments(search: $search, count: $count, cursor: $cursor)
}
`;
const AddExternalReferencesLines = createPaginationContainer(
AddExternalReferencesLinesContainer,
{
data: graphql`
fragment AddExternalReferencesLines_data on Query
@argumentDefinitions(
search: { type: "String" }
count: { type: "Int", defaultValue: 25 }
cursor: { type: "ID" }
) {
externalReferences(search: $search, first: $count, after: $cursor)
@connection(key: "Pagination_externalReferences") {
edges {
node {
id
source_name
description
export const paginationContainer = (query, connectionConfig) => Component => createPaginationContainer(
Component,
query,
connectionConfig,
);
onEndReached={handleOnEndReached}
onRefresh={handleOnRefresh}
refreshing={refreshing}
/>
navigation.navigate("NewTweet")} />
);
};
Feed.navigationOptions = {
title: "InÃcio",
headerRight:
};
const FeedPaginationContainer = createPaginationContainer(
Feed,
{
query: graphql`
fragment Feed_query on Query {
tweets(first: $count, after: $cursor) @connection(key: "Feed_tweets") {
edges {
node {
id
_id
content
likes
retweets
author {
name
}
}