Comments (7)
To make onboarding easier perhaps the config file should be optional? To get started I just added an empty JSON object {}
in .graphqlconfig
. The plugin then works, so it may as start up without any config at all (you still get syntax highlighting, formatting, etc).
Not saying it should "fail silently" - but enabling incremental onboarding is a nice thing - I think. Like eslint - you don't need a config (I think?), once you're up and running you can start to add rules as you like (though I realize most people start with the recommended config, but still).
But at the same time it's a mess if you have a config and it's not loaded (perhaps it's in the wrong dir). What about a message in the console "GraphQL Language Server started without config"?
Just my thoughts.
from vscode-graphql.
Why should it fail silently? This might be a genuine mistake by the developer and this error provides visibility into the problem.
from vscode-graphql.
@timsuchanek out of curiosity, did you get the extension working when the graphqlconfig.yml
file is in a subdirectory?
I have a project using lerna
so the config file isn't in the root but in packages/package-name/.graphqlconfig.yml
and I get the exact same warning showed in your screenshot. 😢
from vscode-graphql.
Thanks all for the detailed feedback. After the initial feedback, I think that the extension should be indeed silent about the graphql config file, that would be an incremental experience as the extension already works with graphql
files without needing a config for features like syntax highlighting. I will take that up soon.
@loicplaire : Currently, it needs the config file to be at the root. That issue is being tracked here #24
from vscode-graphql.
I have a project which happens to generate .graphql
files, but doesn't use them as source, so it doesn't make a lot of sense to use the plugin for anything beyond syntax highlighting. But if I happen to view the file, I get this error, which isn't a nice developer experience.
I understand the argument in favour of having the error for a misconfigured .graphqlconfig
, but I wouldn't show it for a missing one.
from vscode-graphql.
This is fixed and released in 0.1.6
🎉
Sorry for the delay in resolving this 🙏
from vscode-graphql.
I experience the message in the original post on projects that aren't even using graphql. Strange.
from vscode-graphql.
Related Issues (20)
- Add support for graphql.config.ts HOT 4
- Extension issue
- Nothing works except highlighting HOT 10
- Inline fragment(s) not working HOT 6
- Query result does not display tags HOT 2
- 0.3.21 does not load: Cannot find module 'react' HOT 1
- Known Issues, Maintainers & Contributors Needed
- Roadmap
- GraphQL icon clutter HOT 3
- Cannot execute any query or mutation
- Dependency Dashboard
- How do i disable "Execute Query"? HOT 1
- Syntax Error in .vue files HOT 4
- Action Required: Fix Renovate Configuration
- This Extension Has Been Migrated! HOT 2
- GraphQL Configuration not pulling in JWT from environment. HOT 3
- Incorrect deployment to 0.3.50 HOT 1
- Extension crashed on VSCode 1.66.0 (Reading 'timeoutType') HOT 1
- Autocomplete does not work at all HOT 3
- GraphQL language server fails to start due to `Cannot read properties of undefined (reading 'timeoutType')` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-graphql.