{"id":16485247,"url":"https://github.com/drakota/vue3-vite-apollo-example","last_synced_at":"2026-03-11T13:41:47.713Z","repository":{"id":128727049,"uuid":"299400396","full_name":"Drakota/vue3-vite-apollo-example","owner":"Drakota","description":"Example repository to demonstrate how to use Apollo-Client, Vue 3, Vite \u0026 TypeScript together.","archived":false,"fork":false,"pushed_at":"2020-09-28T19:19:53.000Z","size":149,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T15:21:44.963Z","etag":null,"topics":["apollo-client","graphql","typescript","vue3","vue3-composition-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Drakota.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-28T18:40:45.000Z","updated_at":"2024-09-12T00:18:09.000Z","dependencies_parsed_at":"2023-06-05T06:30:19.877Z","dependency_job_id":null,"html_url":"https://github.com/Drakota/vue3-vite-apollo-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Drakota/vue3-vite-apollo-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drakota%2Fvue3-vite-apollo-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drakota%2Fvue3-vite-apollo-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drakota%2Fvue3-vite-apollo-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drakota%2Fvue3-vite-apollo-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Drakota","download_url":"https://codeload.github.com/Drakota/vue3-vite-apollo-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drakota%2Fvue3-vite-apollo-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30382674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T12:49:11.341Z","status":"ssl_error","status_checked_at":"2026-03-11T12:46:41.342Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apollo-client","graphql","typescript","vue3","vue3-composition-api"],"created_at":"2024-10-11T13:25:00.015Z","updated_at":"2026-03-11T13:41:47.707Z","avatar_url":"https://github.com/Drakota.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue3-vite-apollo-example\n\nExample repository to demonstrate how to use `vue-apollo` with [Vite](https://github.com/vitejs/vite) \u0026 Vue 3.\n\n# Getting Started\n\n### Clone the repository\n\n```\n$ git clone https://github.com/Drakota/vue3-vite-apollo-example.git\n```\n\n### Rename .env.example to .env\n\n```\n$ cp .env.example .env\n```\n\n### Install dependencies\n\n```\n$ npm i\n```\n\n### Run the project\n\n```\n$ npm run dev\n```\n\n# Caveats ⚠\n\n## GraphQL-Codegen\n\nThe project uses `graphql-codegen` for generating queries for Vue's composition API that are type-safe and outputs its content into `src/gql/index.ts`, but there doesn't seems to be a way to change how `graphql-codegen` does their imports to adapt for Vite at the moment.\n\n```ts\n// We need to manually change this in src/gql/index.ts\nimport * as VueApolloComposable from \"@vue/apollo-composable\";\nimport * as VueCompositionApi from \"@vue/composition-api\";\n// To this because we are using Vite\nimport VueApolloComposable from \"@vue/apollo-composable\";\nimport VueCompositionApi from \"@vue/composition-api\";\n```\n\n## Vetur Interpolation\n\nWhile using [Vetur's template interpolation service](https://vuejs.github.io/vetur/interpolation.html), we can also see that the type of the `usePagesQuery`'s result isn't properly getting inferred when checking for null value before iterating over.\n\n![Vetur Interpolation](images/vetur_interpolation.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrakota%2Fvue3-vite-apollo-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrakota%2Fvue3-vite-apollo-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrakota%2Fvue3-vite-apollo-example/lists"}