ruanyl / coc-apollo Goto Github PK
View Code? Open in Web Editor NEWcoc.nvim extension for GraphQL/Apollo GraphQL
License: MIT License
coc.nvim extension for GraphQL/Apollo GraphQL
License: MIT License
hi @ruanyl , and thanks for keeping adding new features to the plugin <3
Could you also add git tags when releasing ? Since I'm watching the releases for this repo, I'd be able to follow new features as you release them.
I'm now using [email protected], and trying to setup my status line (really needed a good way to switch from production to local schema, so many thanks for that!).
But I cannot see the variant in my statusline, and debugging further, g:coc_apollo_current_variant
doesn't exist and :CocList variants
returns [coc.nvim] List variants not found
.
In addition, stats stopped showing up on graphql queries.
:CocList variants
[coc.nvim] List variants not found
:CocCommand apollo.reload.variants
[coc.nvim] Command: apollo.reload.variants not found
:CocCommand apollo.reload.stats
[coc.nvim] Command: apollo.reload.stats not foun
:CocList extensions
+ coc-apollo 0.4.1 ~/.config/coc/extensions/node_modules/coc-apollo
.env contains APOLLO_KEY with apollo studio key
.graphqlconfig (Might you be expecting a graphql.config.json
instead of a .graphqlconfig
file ?)
{
"schemaPath": "./schema.graphql"
}
.vim/coc-settings.json
{
...
"apollo.enabled": true,
"apollo.defaultVariant": "current"
}
I noticed that you added Add graphql-config for graphql language server
in the Setup requirements, and tried installing it in my repo with npm i -E -D graphql-config
, but it doesn't have any effect. Are you expecting a global install ? Why can't coc-apollo install it by itself ?
Looking forward to getting this plugin working back again ๐
Hi, and thanks for making this plugin, looking forward to it!
After installing it, I'm seeing this error in my coc log:
2021-02-15T09:13:11.441 ERROR (pid:24749) [extensions] - Error on active extension coc-apollo-graphql: CocApolloGraphqlExtensionError: No Apollo service name found
at loadConfig (/home/dori/.config/coc/extensions/node_modules/coc-apollo-graphql/lib/index.js:38127:11)
at Object.activate (/home/dori/.config/coc/extensions/node_modules/coc-apollo-graphql/lib/index.js:38861:30)
at Object.activate (/home/dori/.vim/plugged/coc.nvim/build/index.js:228:1333)
at t9.activate (/home/dori/.vim/plugged/coc.nvim/build/index.js:225:7211)
at t9.setupActiveEvents (/home/dori/.vim/plugged/coc.nvim/build/index.js:225:10490)
at t9.activateExtensions (/home/dori/.vim/plugged/coc.nvim/build/index.js:224:17268)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async MP.init (/home/dori/.vim/plugged/coc.nvim/build/index.js:254:5524)
at async /home/dori/.vim/plugged/coc.nvim/build/index.js:129:13445 CocApolloGraphqlExtensionError: No Apollo service name found
at loadConfig (/home/dori/.config/coc/extensions/node_modules/coc-apollo-graphql/lib/index.js:38127:11)
at Object.activate (/home/dori/.config/coc/extensions/node_modules/coc-apollo-graphql/lib/index.js:38861:30)
at Object.activate (/home/dori/.vim/plugged/coc.nvim/build/index.js:228:1333)
at t9.activate (/home/dori/.vim/plugged/coc.nvim/build/index.js:225:7211)
at t9.setupActiveEvents (/home/dori/.vim/plugged/coc.nvim/build/index.js:225:10490)
at t9.activateExtensions (/home/dori/.vim/plugged/coc.nvim/build/index.js:224:17268)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async MP.init (/home/dori/.vim/plugged/coc.nvim/build/index.js:254:5524)
at async /home/dori/.vim/plugged/coc.nvim/build/index.js:129:13445
2021-02-15T09:13:11.793 INFO (pid:24749) [plugin] - coc.nvim 0.0.80-fff2a86b16 initialized with node: v15.8.0 after 484ms
2021-02-15T09:13:13.501 INFO (pid:24749) [language-client-index] - eslint started with 24865
2021-02-15T09:13:13.517 INFO (pid:24749) [language-client-index] - tailwindCSS started with 24873
2021-02-15T09:13:13.528 INFO (pid:24749) [services] - registered service "tsserver"
2021-02-15T09:13:17.233 INFO (pid:24749) [attach] - receive notification: openLog []
Checking out the code, it seems like you're trying to extract the service name from the APOLLO_KEY string?
https://github.com/ruanyl/coc-apollo-graphql/blob/1cc73881dbf983d86ac3e9c5575f7d5c428d57e2/src/utils.ts#L1
My .env settings looks like APOLLO_KEY=user:gh.AdrienLemaire:iatBC...5F
, which, is completely different from my service name defined in apollo.config.js
module.exports = {
client: {
name: "Project [web]",
service: {
name: "project", // <= That's my service name
url: process.env.GRAPHQL_URI || "http://localhost:4001/graphql",
skipSSLValidation: true,
},
excludes: ["**/__tests__/**/*"],
},
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.