npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

graphql-for-vscode

v0.5.0

Published

GraphQL syntax highlighting, linting, auto-complete, and more!

Downloads

28

Readme

VSCode extension for GraphQL schema authoring & consumption.

A preview of the extension

What's in the Box?

  • Go to Definition: Just F12 or Ctrl+Click on any graphql type, and you'll jump right to it's definition. Go to Definition
  • Schema Validation: The plugin also validates your schema, so that you catch errors early.
  • Autocomplete: You also get full cross-file autocomplete support. Autocomplete
  • Great Syntax Highlighting: Now, your gql files will look as beautiful as your other code with an awesome syntax highlighter which works not just with your schema files, but also within your Javascript/Typescript files.
  • Linting: This plugin uses a similar method as used by the Codemirror graphql project for linting.
  • Snippets: Some commonly used snippets are provided which help while writing mutations and queries, such as definiting types, interfaces and input types.
  • Autocomplete: Uses the @playlyfe/gql library to read your whole graphql schema definitions and provide you with autocomplete support while writing & editing your .gql files.

Setting it Up

  1. Ensure that you have the @playlyfe/gql library installed and available to this plugin. If you've installed the library in a folder other than the workspace root, then add the path to the node_modules directory as a setting:
{
  "graphqlForVSCode.nodePath": "ui/node_modules"
}
  1. Ensure you have watchman installed and available in your path. Watchman watches your gql files and provides up-to-date suggestions. For users on Windows, get the latest build mentioned in this issue and add the location of watchman.exe to your environment path.

Future Plans

  • Improved Linting: Since graphql schemas can be written in multiple .gql files, so cross-file linting should be available. I'm not sure of the implementation as of now though.
  • Tests: Figure out tests.

Contributing

  • If you have a suggestion or a problem, please open an issue.
  • If you'd like to improve the extension:
    • If you've made any improvements to the extension, send a Pull Request!
    • The instructions to run the server are here
    • The instructions to run and debug the client are here

Hacking

Client

If you're making changes to the client, then run npm run watch inside this directory, then just press F5 to launch the Extension Development Host instance of vscode. Whenever you make a change, press Reload to reload the EDH instance.

Server

If you're making changes to the server, then run npm run watch-server from the root directory. Then, run the client in debug mode. If you make any change in the server code, you need to reload the Extension Development Host instance of vscode.

Major Contributors

  • Mayank Agarwal - added autocomplete, goto definition, schema validation support

Happy Querying!