How to use @apollo/react-hoc - 10 common examples

To help you get started, we’ve selected a few @apollo/react-hoc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github letterpad / letterpad / src / shared / data-connectors / LatestPublishedPosts.js View on Github external
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,
  }),
});
github dotansimha / graphql-code-generator / dev-test / star-wars / __generated__ / HeroDetailsWithFragment.tsx View on Github external
export function withHeroDetailsWithFragment(operationOptions?: ApolloReactHoc.OperationOption>) {
  return ApolloReactHoc.withQuery>(HeroDetailsWithFragmentDocument, {
    alias: 'heroDetailsWithFragment',
    ...operationOptions,
  });
}
export type HeroDetailsWithFragmentQueryResult = ApolloReactCommon.QueryResult;
github dotansimha / graphql-code-generator / dev-test / star-wars / __generated__ / TwoHeroes.tsx View on Github external
export function withTwoHeroes(operationOptions?: ApolloReactHoc.OperationOption>) {
  return ApolloReactHoc.withQuery>(TwoHeroesDocument, {
    alias: 'twoHeroes',
    ...operationOptions,
  });
}
export type TwoHeroesQueryResult = ApolloReactCommon.QueryResult;
github dotansimha / graphql-code-generator / dev-test / githunt / types.reactApollo.tsx View on Github external
export function withFeed(operationOptions?: ApolloReactHoc.OperationOption>) {
  return ApolloReactHoc.withQuery>(FeedDocument, {
    alias: 'feed',
    ...operationOptions,
  });
}
export type FeedQueryResult = ApolloReactCommon.QueryResult;
github dotansimha / graphql-code-generator / dev-test / star-wars / __generated__ / HeroDetails.tsx View on Github external
export function withHeroDetails(operationOptions?: ApolloReactHoc.OperationOption>) {
  return ApolloReactHoc.withQuery>(HeroDetailsDocument, {
    alias: 'heroDetails',
    ...operationOptions,
  });
}
export type HeroDetailsQueryResult = ApolloReactCommon.QueryResult;
github dotansimha / graphql-code-generator / dev-test / star-wars / __generated__ / HeroNameConditional.tsx View on Github external
export function withHeroNameConditionalExclusion(
  operationOptions?: ApolloReactHoc.OperationOption>
) {
  return ApolloReactHoc.withQuery>(HeroNameConditionalExclusionDocument, {
    alias: 'heroNameConditionalExclusion',
    ...operationOptions,
  });
}
export type HeroNameConditionalExclusionQueryResult = ApolloReactCommon.QueryResult;
github dotansimha / graphql-code-generator / dev-test / githunt / types.reactApollo.customSuffix.tsx View on Github external
export function withCurrentUserForProfile(operationOptions?: ApolloReactHoc.OperationOption>) {
  return ApolloReactHoc.withQuery>(CurrentUserForProfileDocument, {
    alias: 'currentUserForProfile',
    ...operationOptions,
  });
}
export type CurrentUserForProfileQueryResult = ApolloReactCommon.QueryResult;
github dotansimha / graphql-code-generator / dev-test / githunt / types.reactApollo.preResolveTypes.tsx View on Github external
export function withFeed(operationOptions?: ApolloReactHoc.OperationOption>) {
  return ApolloReactHoc.withQuery>(FeedDocument, {
    alias: 'feed',
    ...operationOptions,
  });
}
export type FeedQueryResult = ApolloReactCommon.QueryResult;
github dotansimha / graphql-code-generator / dev-test / star-wars / __generated__ / HeroParentTypeDependentField.tsx View on Github external
export function withHeroParentTypeDependentField(
  operationOptions?: ApolloReactHoc.OperationOption>
) {
  return ApolloReactHoc.withQuery>(HeroParentTypeDependentFieldDocument, {
    alias: 'heroParentTypeDependentField',
    ...operationOptions,
  });
}
export type HeroParentTypeDependentFieldQueryResult = ApolloReactCommon.QueryResult;
github dotansimha / graphql-code-generator / dev-test / githunt / types.reactApollo.hooks.tsx View on Github external
export function withFeed(operationOptions?: ApolloReactHoc.OperationOption>) {
  return ApolloReactHoc.withQuery>(FeedDocument, {
    alias: 'feed',
    ...operationOptions,
  });
}

@apollo/react-hoc

React Apollo `graphql` higher-order component.

MIT
Latest version published 4 years ago

Package Health Score

64 / 100
Full package analysis