GithubHelp home page GithubHelp logo

Comments (7)

lirbank avatar lirbank commented on May 3, 2024 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.

marktani avatar marktani commented on May 3, 2024 4

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.

loicplaire avatar loicplaire commented on May 3, 2024 4

@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.

divyenduz avatar divyenduz commented on May 3, 2024 3

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.

AndrewIngram avatar AndrewIngram commented on May 3, 2024 1

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.

divyenduz avatar divyenduz commented on May 3, 2024 1

This is fixed and released in 0.1.6 🎉
Sorry for the delay in resolving this 🙏

from vscode-graphql.

zackkrida avatar zackkrida commented on May 3, 2024

I experience the message in the original post on projects that aren't even using graphql. Strange.

from vscode-graphql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.