How to use the vue-apollo.ApolloQuery.data function in vue-apollo

To help you get started, we’ve selected a few vue-apollo 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 abhiaiyer91 / apollo-fragment / packages / apollo-fragment-vue / src / ApolloFragment.js View on Github external
data(props) {
    const { id, fragment } = this.$options.propsData;
    const { fragmentTypeName, fragmentName } = getFragmentInfo(fragment);
    const query = buildFragmentQuery({ fragment, fragmentName });

    return {
      ...ApolloQuery.data(),
      query,
      variables: {
        id,
        __typename: fragmentTypeName,
      },
    };
  },
  apollo: {