Git Product home page Git Product logo

vscode-reasonml-graphql's Introduction

vscode-reasonml-graphql

Tighter integration between ReasonML and GraphQL in VSCode.

Features

Supports both graphql_ppx and ReasonRelay.

  • Syntax highlighting for GraphQL in ReasonML.
  • Autocomplete and validations for your GraphQL operations using the official GraphQL Language Server.
  • Format all GraphQL operations in your Reason file using prettier.
  • Generate fragments, queries, mutations and subscriptions for ReasonRelay (and edit them in GraphiQL if vscode-graphiql-explorer is installed).

Setup

In addition to this extension, you're encouraged to also install vscode-graphiql-explorer for the best experience.

vscode-reasonml-graphql needs your introspected schema, either as a .json or a .graphql file, through a file called .graphqlconfig in your project root.

Make sure you have a .graphqlconfig file in your project root containing a schemaPath pointing to your schema, like { "schemaPath": "/path/to/schema.graphql" }.

If you don't already have a introspection schema file you can create one by running npx get-graphql-schema http://url/to/your/graphql/endpoint > schema.graphql in your project root.

Usage

In addition to providing integration with the official GraphQL language server, the extension currently add 1 command:

  1. Format GraphQL operations in document, which will format all GraphQL operations defined in the current document.

WIP/Coming soon

  • Specific GraphQL validation rules for graphql_ppx and ReasonRelay for the language server integration. Read: Validations will include custom directives defined by each framework, and for ReasonRelay validation will be provided for most (if not all) special Relay rules in GraphQL.
  • Figure out bundling to reduce size.

Background, vision and contributing

Let's work together to provide the best possible experience we can for using GraphQL with ReasonML. Please post any ideas or thoughts, large or small, in the issues and let's get some great discussions for features going!

vscode-reasonml-graphql's People

Contributors

zth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gaku-sei farukg

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.