{"id":18296335,"url":"https://github.com/ruanyl/coc-apollo","last_synced_at":"2025-10-15T03:05:26.734Z","repository":{"id":40796356,"uuid":"214886747","full_name":"ruanyl/coc-apollo","owner":"ruanyl","description":"coc.nvim extension for GraphQL/Apollo GraphQL","archived":false,"fork":false,"pushed_at":"2023-07-19T01:25:44.000Z","size":699,"stargazers_count":4,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T04:22:17.710Z","etag":null,"topics":["apollo-schema-registry","apollographql","coc-apollo","graphql","graphql-language-server","neovim","nvim-extension","plugin","vim"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruanyl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2019-10-13T20:11:14.000Z","updated_at":"2023-09-26T17:16:55.000Z","dependencies_parsed_at":"2024-11-05T14:56:34.100Z","dependency_job_id":null,"html_url":"https://github.com/ruanyl/coc-apollo","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanyl%2Fcoc-apollo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanyl%2Fcoc-apollo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanyl%2Fcoc-apollo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanyl%2Fcoc-apollo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruanyl","download_url":"https://codeload.github.com/ruanyl/coc-apollo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339020,"owners_count":20923004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-schema-registry","apollographql","coc-apollo","graphql","graphql-language-server","neovim","nvim-extension","plugin","vim"],"created_at":"2024-11-05T14:40:23.359Z","updated_at":"2025-10-15T03:05:26.656Z","avatar_url":"https://github.com/ruanyl.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coc-apollo (WIP)\n\ncoc.nvim extension for Apollo GraphQL. Still work in progress, feedbacks and PRs are welcome.\n\n## Install\n\n`:CocInstall coc-apollo`\n\n## Features\n### Client Project\n1. [GraphQL Language Server](https://github.com/graphql/graphiql/blob/main/packages/graphql-language-service-server/README.md): autocomplete, diagnostics...\n2. Apollo GraphQL integration (Use the Apollo schema registry)\n    - Graph variants switching\n    - Performance stats (require `virtual text`)\n3. Support loading schema from a remote endpoint, [example config](https://www.apollographql.com/docs/devtools/apollo-config/#option-2-link-a-schema-from-a-remote-endpoint)\n4. Support loading schema from local: [example config](https://www.apollographql.com/docs/devtools/apollo-config/#option-3-link-a-schema-from-a-local-file)\n\n### Service project\nTODO...\n\n## Setup\n1. Add `APOLLO_KEY` to `.env`\n2. Add [graphql-config](https://github.com/kamilkisiela/graphql-config) for graphql language server\n3. (Optional) Add `apollo.config.json` or `apollo.config.js`, [config details](https://www.apollographql.com/docs/devtools/apollo-config/)\n4. (Optional) Use [vim-graphql](https://github.com/jparise/vim-graphql) for syntax highlighting\n\n## Configure graphql.config.json\nThe plugin will download schema from Apollo Schema Registry/local schema/remote schema, it generates `schema.graphql` file by default. So you have to specify `\"schema\": \"schema.graphql\"` in the config in order for language server to read.\n\nExample `graphql.config.json`\n```json\n{\n  \"schema\": \"schema.graphql\"\n}\n```\n\nYou can also customize the exported schema filename and type with `:CocConfig`\n```\n{\n  \"apollo.schema.filename\": \"schema.json\"\n}\n```\nThis will output the file in json format by converting the schema to schema introspection\n\n## Configurations\n\n`apollo.defaultVariant` the default apollo graph variant to download when the plugin been initially loaded, default: current\n\n## Setup status line\n![statusline](https://user-images.githubusercontent.com/486382/108122730-69b42980-70ad-11eb-9c70-b99e216d2373.png)\n```vimscript\nfunction! LightlineCocApolloStatus() abort\n  let status = get(g:, 'coc_apollo_current_variant', '')\n  if empty(status)\n    return ''\n  endif\n  return '🚀 ' . status\nendfunction\n\nlet g:lightline = {\n  \\ 'active': {\n  \\   'left': [\n  \\     [ 'mode', 'paste' ],\n  \\     [ 'readonly', 'filename' ]\n  \\   ],\n  \\   'right':[\n  \\     [ 'filetype', 'lineinfo', 'percent', 'cocstatus' ],\n  \\     [ 'cocapollo' ]\n  \\   ],\n  \\ },\n  \\ 'component_function': {\n  \\   'cocapollo': 'LightlineCocApolloStatus'\n  \\ }\n\\ }\n\n```\n\n## Lists\n\nShow variant list: \n```\n:CocList variants\n```\n\n## Commands\nReload Apollo graphql schema variant list\n```\n:CocCommand apollo.reload.variants\n```\n\nReload Apollo field stats\n```\n:CocCommand apollo.reload.stats\n```\n## License\n\nMIT\n\n---\n\n\u003e This extension is built with [create-coc-extension](https://github.com/fannheyward/create-coc-extension)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruanyl%2Fcoc-apollo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruanyl%2Fcoc-apollo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruanyl%2Fcoc-apollo/lists"}