{"_id":"@black-kro/use-apollo","_rev":"3-a7fac551f74956e1d93219bbe8576e97","name":"@black-kro/use-apollo","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@black-kro/use-apollo","version":"0.0.1","private":false,"main":"./dist/index.common.js","module":"./dist/index.esm.js","types":"./dist/index.d.ts","license":"MIT","scripts":{"dev":"vite","build":"rm -rf ./dist && rollup -c","prepublishOnly":"yarn build"},"keywords":["vue","apollo"],"repository":{"type":"git","url":"git+https://github.com/Black-Kro/useApollo.git"},"bugs":{"url":"https://github.com/Black-Kro/useApollo/issues"},"dependencies":{"@apollo/client":"^3.1.4","@rollup/plugin-commonjs":"^15.0.0","graphql":"^15.3.0","throttle-debounce":"^2.3.0","vue":"3.0.0-rc.10"},"devDependencies":{"@rollup/plugin-buble":"^0.21.3","@vue/compiler-sfc":"3.0.0-rc.10","rollup-plugin-clean":"^1.0.0","rollup-plugin-copy":"^3.3.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-terser":"^7.0.1","rollup-plugin-typescript2":"^0.27.2","rollup-plugin-vue":"^6.0.0-beta.10","typescript":"^4.0.2","vite":"^1.0.0-rc.1"},"gitHead":"1c72c7ef3be35e74aafe7c92a20b4196df5a96ea","description":"***NOTE: This is a fork of [Vue Apollo V4 Composable](https://github.com/vuejs/vue-apollo/tree/v4/packages/vue-apollo-composable)***","homepage":"https://github.com/Black-Kro/useApollo#readme","_id":"@black-kro/use-apollo@0.0.1","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-fhKaTXPFVdudIrDfzjXQt/gK+JTeVF5SJ9/zr/oxxBllqKtpzuAGqepmwWN7a3D/QpViPaBsWVn1QLqt5W10IQ==","shasum":"c5675b27d2390cc901e1af2f2945cca68add0d49","tarball":"https://registry.npmjs.org/@black-kro/use-apollo/-/use-apollo-0.0.1.tgz","fileCount":38,"unpackedSize":82265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUScoCRA9TVsSAnZWagAAKZEP/0ZywWLsViWUZE+HE85h\no2t4iXRnOjhalqdEJwsGpTQncs3uh3rytJj4uhLddQP17XdlZQUqzwCHP6oQ\n2QdbomPNkEfH6j0e0SGN4IM4LUwQd9ya9N+y1S9DfYoVAZjIMAd2YvemPZhv\nCNFON/NdON7nTuXiFT40N3d/EYo4yH0BUtj5HaFkvQkcMpU2stzGOWUNBS68\nM9CKTrTERrxC2SJCuf4z/6wzt20yc8eBibxcEsoA5e9G5sJ5YVAuddHiyHRE\nKJBMkjcp+tmwYqEwncqvtaCdV/8Utip5i8+bh9bof5SCxm0uKpE2Ax1Le9ze\nPSaTCEoEyQYq6Snue8JTt0aHkK1gBCusghfrELgt3tebSeGs8mfwPFK2vbDX\nSsMl4laMpCGyP5QMZPRy19aLDh5TV8YVA/h0Udw0+/C0+r7RRCoFhxdmg/LG\nk/qmxEFLisHHvPCYpZtcOU8UVtBeyxy7u53ypk4kdGXpuO/oQ0rZ54847wU/\nJ3BIyfDe9hdTZAESXcXM9ZZRGn6wAGtHf9vIo63+H0MWb3Ho/clLbAB2Dfsm\n2Wj2Z8yDYdFzxPYmXqggqY6t5mqUtEvS3IQl1xrEWGvTpgRtNW5mf1ACitGl\nctGrS2JS48M3tEAPXigPVnESTjVnxG2N+E660Dz9TGDq4Z5UZ5YubQf62UUP\ncQNL\r\n=P/mc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/L1c2SXN0X0eKMCEECqOEBrL3zsZZOcPz7+UA+iE7QwIhALscnw9dfkj6iOU/Rf8XgYWzh68M2G6ABLTPJsdTeMtN"}]},"maintainers":[{"name":"wheatley","email":"jacobrclevenger@gmail.com"}],"_npmUser":{"name":"wheatley","email":"jacobrclevenger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-apollo_0.0.1_1599153959642_0.8616112156636255"},"_hasShrinkwrap":false},"0.0.2":{"name":"@black-kro/use-apollo","version":"0.0.2","private":false,"main":"./dist/index.common.js","module":"./dist/index.esm.js","types":"./dist/index.d.ts","license":"MIT","scripts":{"dev":"vite","build":"rm -rf ./dist && rollup -c","prepublishOnly":"yarn build"},"keywords":["vue","apollo"],"repository":{"type":"git","url":"git+https://github.com/Black-Kro/useApollo.git"},"bugs":{"url":"https://github.com/Black-Kro/useApollo/issues"},"dependencies":{"@apollo/client":"^3.1.4","graphql":"^15.3.0","throttle-debounce":"^2.3.0","vue":"3.0.0-rc.10"},"devDependencies":{"@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-buble":"^0.21.3","@vue/compiler-sfc":"3.0.0-rc.10","rollup-plugin-clean":"^1.0.0","rollup-plugin-copy":"^3.3.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-terser":"^7.0.1","rollup-plugin-typescript2":"^0.27.2","rollup-plugin-vue":"^6.0.0-beta.10","typescript":"^4.0.2","vite":"^1.0.0-rc.1"},"gitHead":"03adb46fd1c8a0ae9b732f1a9d584f7beff9f692","description":"***NOTE: This is a fork of [Vue Apollo V4 Composable](https://github.com/vuejs/vue-apollo/tree/v4/packages/vue-apollo-composable)***","homepage":"https://github.com/Black-Kro/useApollo#readme","_id":"@black-kro/use-apollo@0.0.2","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-BwerRtGMUKtVc68C2jBUeH2hsZhL+acCesnE+Gmrxx/9C6pfSUH2OZ6cuAEeHOuE1/uu3Jo6w9FiAWHzaS+gKw==","shasum":"8391451e453d05ea59dddbc644ef1d7e2f3306a8","tarball":"https://registry.npmjs.org/@black-kro/use-apollo/-/use-apollo-0.0.2.tgz","fileCount":40,"unpackedSize":106174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUZs1CRA9TVsSAnZWagAAdQMP/1xmtrvA5gyLzKrHk/tI\nDFSlLZhpejcqPLGs7l5L+d16yEeARUh9wHMxi02BJoa87CcfKb7iwgBzps+d\nUGHZr27Pq7Mfrp4kSo6WPKoiTETQF2f5ZIXnzus8aaHrSJuc9Jq0ZYafjp/x\nMOVBV4PeF0urG9LvBBlGbmupt3duVSW0UP4jf0vb8PTZP8vy22tIvisItyVQ\nmD3CEZiVXWC+sJPl8nLa/9JG8RA85brB3PSNyWWH9X08JNuq+IJtgx84wkrq\nyRkBfr6MR7dnZ12ksvYEqxc9SYDhcbd/pzcR/YdF3NzvsZ6qJB+isLPmNb+I\nbndJoOmECczP+aZH1RY0tApFnnGkZcTCcvFuVIkzSEbdhGCOGDNgonGZflb+\nPjYqdRQ5i+gyIQf7YHfH8mDNlgPayEWIc5EOqwboHmgGf4g8SN0Rgj4bZJpV\neIDvqjkCTU8B2StfJ9xCorAK60RD26VsVuu1qfDLlN94sV78pg0X+4fqnqLT\n2agVzsFCm5rMJJXQJ7da2jxcDWb5y1QfGgQn363uFe54HI7jukAhZzIdxJFF\nRU3aFiLA5W/vU6zT23E6hBmZ2gwhi2iWlH6hNfPXWrqcrKpnSCkGVpvycYOX\nUUv6qWLGfkAHcQw1EJLT4WEzMfb57/bQNAV0i2/KbnCsLW8P+egHpIY0ZsL2\nJ5K5\r\n=CgR7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJm/6bo2bpgANo5TOtYe/5Ga2eIJ/G2KkpYTJjKO2KpAIgFjjKta3NsDuD4/CpCMxwIj0k2razwYXvciIRjKQlTo0="}]},"maintainers":[{"name":"wheatley","email":"jacobrclevenger@gmail.com"}],"_npmUser":{"name":"wheatley","email":"jacobrclevenger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-apollo_0.0.2_1599183668760_0.4284542514237013"},"_hasShrinkwrap":false},"0.0.3":{"name":"@black-kro/use-apollo","version":"0.0.3","private":false,"main":"./dist/index.common.js","module":"./dist/index.esm.js","types":"./dist/index.d.ts","license":"MIT","scripts":{"dev":"vite","build":"rm -rf ./dist && rollup -c","prepublishOnly":"yarn build"},"keywords":["vue","apollo"],"repository":{"type":"git","url":"git+https://github.com/Black-Kro/useApollo.git"},"bugs":{"url":"https://github.com/Black-Kro/useApollo/issues"},"dependencies":{"@apollo/client":"^3.1.4","graphql":"^15.3.0","throttle-debounce":"^2.3.0","vue":"3.0.0-rc.10"},"devDependencies":{"@rollup/plugin-commonjs":"^15.0.0","@rollup/plugin-buble":"^0.21.3","@vue/compiler-sfc":"3.0.0-rc.10","rollup-plugin-clean":"^1.0.0","rollup-plugin-copy":"^3.3.0","rollup-plugin-delete":"^2.0.0","rollup-plugin-terser":"^7.0.1","rollup-plugin-typescript2":"^0.27.2","rollup-plugin-vue":"^6.0.0-beta.10","typescript":"^4.0.2","vite":"^1.0.0-rc.1"},"gitHead":"b20483bd847ac775c64057c4fb38a003a672157e","description":"***NOTE: This is a fork of [Vue Apollo V4 Composable](https://github.com/vuejs/vue-apollo/tree/v4/packages/vue-apollo-composable)***","homepage":"https://github.com/Black-Kro/useApollo#readme","_id":"@black-kro/use-apollo@0.0.3","_nodeVersion":"14.9.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-XbE1jJFh/q5lgx9zgE8pk6Wk0oUo0HWWjPr7oPQft7Sk2+2pth9zlKeogRpwWHNbyM4rNUtrnEfmB1yQn2tBFA==","shasum":"ae3c13c0fc16e90e9c82284067760b895d57793b","tarball":"https://registry.npmjs.org/@black-kro/use-apollo/-/use-apollo-0.0.3.tgz","fileCount":40,"unpackedSize":107110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUbIVCRA9TVsSAnZWagAApdYP/0H57w2Zh91b4r5jWr7P\nGwr7lAHPHBosmfbGGf75QPh3Sehp8bsZKP4s5zUbijhDCvG0EcTpcSNCosoM\na8ZhzaRax06jEnLjI/MMvOos56tMDQoVGgT9HQhLWq+HLeCPy9XsrEmEa4Km\nXVuhOTajTQOOJRbJveKdJTYS4+do7t0dt5c299AAfBoBO9zfwcfUkKJeYuyN\nfL+cor5G5nUA+EpkEEFXN+CDu5Yi/6ILCfQIvtv389HQXgg1CIafsCiENECj\nj8tJpQDMo4NGiDgBjrtB2PtZ1KixA6OA5zynEZNkrRXeUEP+QT2CmwrzG4Ug\nueMISfI4OIaUDuSm13lE+PoqlR4D5ywGQ1aKmiOjJ3itzx4HS7zovRCBifkr\nPfuy3w1LHoZ6DXO5Nw6t7Ni/PxW+gTOAbTXAqvp2Iry5fAQ22ruQco4lVVxP\njuSIIS1Gt4uOBEcdyQuThqO93DI2dtKBjif/R9V0dgPGxK4AS30G1uCZMfO7\nmmw8VJi7KUp3ZaPC81sWBgj7BfWjgkguq6MewlXzVFIFOt5ezvzmTSo9OM5T\n+x6Uk1EuDa4KOIB3HavOrZQB4gY5ErueHEmPMe8FoMwDtpvp2J5FHOgJxGSy\nMSAWGcHZlamqz/FWlYfvcne/X4pcWHSyM2TzKs1rfCtQmVFb3hOMEBcNz7Nr\ns4J3\r\n=F9kV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLvWTlG1j95Lr8J/p0y6skSBOQaR5RDF60QIG9kAoirQIgFoBLove0bBmNavP7p/OqSWEqk9r7p5rn5R+/No9pPr8="}]},"maintainers":[{"name":"wheatley","email":"jacobrclevenger@gmail.com"}],"_npmUser":{"name":"wheatley","email":"jacobrclevenger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-apollo_0.0.3_1599189525239_0.858779727137555"},"_hasShrinkwrap":false}},"time":{"created":"2020-09-03T17:25:59.389Z","0.0.1":"2020-09-03T17:25:59.787Z","modified":"2022-04-04T19:19:23.964Z","0.0.2":"2020-09-04T01:41:08.933Z","0.0.3":"2020-09-04T03:18:45.364Z"},"maintainers":[{"name":"wheatley","email":"jacobrclevenger@gmail.com"}],"description":"***NOTE: This is a fork of [Vue Apollo V4 Composable](https://github.com/vuejs/vue-apollo/tree/v4/packages/vue-apollo-composable)***","homepage":"https://github.com/Black-Kro/useApollo#readme","keywords":["vue","apollo"],"repository":{"type":"git","url":"git+https://github.com/Black-Kro/useApollo.git"},"bugs":{"url":"https://github.com/Black-Kro/useApollo/issues"},"license":"MIT","readme":"***NOTE: This is a fork of [Vue Apollo V4 Composable](https://github.com/vuejs/vue-apollo/tree/v4/packages/vue-apollo-composable)***\n\n# useApollo\nuseApollo is a \"fork\" of vue-apollo that removes support from Vue 2.x and adds support for Apollo 3.x and Vue 3.x \n\nSince this library is a fork of the original vue-apollo and only includes the `apollo-composable` portion of the library, only certain portions of the docs will be helpful to you.\n\n**Relevant Documentation**\n\n[Vue Apollo - Composition API](https://v4.apollo.vuejs.org/api/use-query.html)\n\n## Why?\nThe reason for this library fork is the Vue Apollo library does not currently support Apollo 3 and the support for Vue 3.x is not very good either. This fork hopes to resolve those issues until the official library has proper support for both Apollo 3 and Vue 3.x. This library will try its best to use the same API as the Vue Apollo library so when the official library is up to date it will be easy to switch back to it.\n\n## Installing\n```\nyarn add @black-kro/useApollo @apollo/client\n```\n\n## Using\n\n*apollo.ts*\n```ts\nimport { ApolloClient, InMemoryCache, gql } from '@apollo/client/core';\n\nexport const client = new ApolloClient({\n    uri: 'MY SERVER URL',\n    cache: new InMemoryCache()\n});\n```\n\n*main.ts*\n```ts\nimport { createApp } from 'vue'\nimport App from './App.vue'\n\n// Import DefaultApollo symbol from package and import your client.\nimport { DefaultApolloClient } from './composables';\nimport { client } from './apollo';\n\ncreateApp(App)\n    // Provide your client to the useApollo library.\n    .provide(DefaultApolloClient, client)\n    .mount('#app')\n```\n\n*App.vue*\n```html\n<template>\n    <div v-if=\"loading\">Loading...</div>\n    <div v-else-if=\"error\">{{error}}</div>\n    <div v-else-if=\"result\">{{result}}</div>\n</template>\n\n<script setup>\n    import { useQuery } from '@black-kro/useApollo';\n    import { gql } from '@apollo/client/core';\n\n    export const { loading, error, result } = useQuery(gql`\n        query Me {\n            me {\n                id\n                username\n            }\n        }\n    `);\n</script>\n```\n\n## Non-Standard API's\n\n- `useLazyQuery`\n    \n    This works the same as `useQuery` except it will not auto run. To run the query you must use the `fetch` function on the object.\n\n    ```ts\n    const { fetch, result, loading, error } = useLazyQuery(...);\n\n    fetch({ myVariables });\n    ```\n\n## Troubleshooting\n\n### Vite\nIf you are using vite you may run into some troubles when attempting to create your Apollo Client, to resolve this create a `vite.config.ts` file like below to resolve the issues.\n\n```ts\nimport { UserConfig } from 'vite';\n\nconst config: UserConfig = {\n    optimizeDeps: {\n        include: [\n            'fast-json-stable-stringify',\n            'zen-observable',\n            'graphql-tag'\n        ]\n    },\n    rollupInputOptions: {\n        external: [\n            'react',\n        ]\n    },\n}\n\nexport default config;\n```\n\n## License\n[MIT](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2020-present, Black Kro","readmeFilename":"README.md"}