Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { graphql } from "@apollo/react-hoc";
import { GET_LATEST_PUBLISHED_POSTS } from "../queries/Queries";
export default graphql(GET_LATEST_PUBLISHED_POSTS, {
options: props => ({
variables: {
type: "post",
limit: props.limit || 3,
},
}),
props: ({ data: { loading, posts } }) => ({
posts,
ploading: loading,
}),
});
export function withHeroDetailsWithFragment(operationOptions?: ApolloReactHoc.OperationOption>) {
return ApolloReactHoc.withQuery>(HeroDetailsWithFragmentDocument, {
alias: 'heroDetailsWithFragment',
...operationOptions,
});
}
export type HeroDetailsWithFragmentQueryResult = ApolloReactCommon.QueryResult;
export function withTwoHeroes(operationOptions?: ApolloReactHoc.OperationOption>) {
return ApolloReactHoc.withQuery>(TwoHeroesDocument, {
alias: 'twoHeroes',
...operationOptions,
});
}
export type TwoHeroesQueryResult = ApolloReactCommon.QueryResult;
export function withFeed(operationOptions?: ApolloReactHoc.OperationOption>) {
return ApolloReactHoc.withQuery>(FeedDocument, {
alias: 'feed',
...operationOptions,
});
}
export type FeedQueryResult = ApolloReactCommon.QueryResult;
export function withHeroDetails(operationOptions?: ApolloReactHoc.OperationOption>) {
return ApolloReactHoc.withQuery>(HeroDetailsDocument, {
alias: 'heroDetails',
...operationOptions,
});
}
export type HeroDetailsQueryResult = ApolloReactCommon.QueryResult;
export function withHeroNameConditionalExclusion(
operationOptions?: ApolloReactHoc.OperationOption>
) {
return ApolloReactHoc.withQuery>(HeroNameConditionalExclusionDocument, {
alias: 'heroNameConditionalExclusion',
...operationOptions,
});
}
export type HeroNameConditionalExclusionQueryResult = ApolloReactCommon.QueryResult;
export function withCurrentUserForProfile(operationOptions?: ApolloReactHoc.OperationOption>) {
return ApolloReactHoc.withQuery>(CurrentUserForProfileDocument, {
alias: 'currentUserForProfile',
...operationOptions,
});
}
export type CurrentUserForProfileQueryResult = ApolloReactCommon.QueryResult;
export function withFeed(operationOptions?: ApolloReactHoc.OperationOption>) {
return ApolloReactHoc.withQuery>(FeedDocument, {
alias: 'feed',
...operationOptions,
});
}
export type FeedQueryResult = ApolloReactCommon.QueryResult;
export function withHeroParentTypeDependentField(
operationOptions?: ApolloReactHoc.OperationOption>
) {
return ApolloReactHoc.withQuery>(HeroParentTypeDependentFieldDocument, {
alias: 'heroParentTypeDependentField',
...operationOptions,
});
}
export type HeroParentTypeDependentFieldQueryResult = ApolloReactCommon.QueryResult;
export function withFeed(operationOptions?: ApolloReactHoc.OperationOption>) {
return ApolloReactHoc.withQuery>(FeedDocument, {
alias: 'feed',
...operationOptions,
});
}