Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zth/vscode-reasonml-graphql
Tighter integration between ReasonML and GraphQL in VSCode.
https://github.com/zth/vscode-reasonml-graphql
graphql reasonml vscode vscode-extension
Last synced: 13 days ago
JSON representation
Tighter integration between ReasonML and GraphQL in VSCode.
- Host: GitHub
- URL: https://github.com/zth/vscode-reasonml-graphql
- Owner: zth
- Created: 2020-01-24T18:34:52.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T15:57:29.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T01:30:36.625Z (3 months ago)
- Topics: graphql, reasonml, vscode, vscode-extension
- Language: TypeScript
- Size: 115 KB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-list - vscode-reasonml-graphql
README
# 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!