3.3.33 • Published 2 months ago

graphql-language-service-cli v3.3.33

Weekly downloads
180
License
MIT
Repository
github
Last release
2 months ago

graphql-language-service-cli

Note: As of 3.0.0, this package has been renamed from graphql-language-service to graphql-language-service-cli. please now use the graphql-lsp bin, instead of the graphql binary.

NPM npm downloads Snyk Vulnerabilities for npm package License

We welcome your feedback and suggestions.

GraphQL Language Service provides an interface for building GraphQL language services for IDEs.

Partial support for Microsoft's Language Server Protocol is in place, with more to come in the future.

Supported features include:

  • Diagnostics (GraphQL syntax linting/validations) (spec-compliant)
  • Autocomplete suggestions (spec-compliant)
  • Hyperlink to fragment definitions and named types (type, input, enum) definitions (spec-compliant)
  • Outline view support for queries

Installation and Usage

Dependencies

An LSP-compatible client with a file watcher that sends watch notifications to the server.

DROPPED: GraphQL Language Service no longer depends on Watchman

Installation

with yarn:

yarn global add graphql-language-service-cli

with npm:

npm i -g graphql-language-service-cli

GraphQL configuration file (.graphqlrc.yml)

Check out graphql-config

The graphql features we support are:

  • customDirectives - ['@myExampleDirective']
  • customValidationRules - returns rules array with parameter ValidationContext from graphql/validation;

Using the command-line interface

The node executable contains several commands: server and the command-line language service methods (validate, autocomplete, outline).

Improving this list is a work-in-progress.

GraphQL Language Service Command-Line Interface.

Usage: bin/graphql.js <command> <file>

[-h | --help][-c | --configdir] {configDir}
[-t | --text] {textBuffer}
[-f | --file] {filePath}
[-s | --schema] {schemaPath}

Options:

-h, --help Show help [boolean]

-t, --text Text buffer to perform GraphQL diagnostics on.
Will defer to --file option if omitted.
Overrides the --file option, if any.
[string]

-f, --file File path to perform GraphQL diagnostics on.
Will be ignored if --text option is supplied.
[string]

--row A row number from the cursor location for GraphQL
autocomplete suggestions.
If omitted, the last row number will be used.
[number]

--column A column number from the cursor location for GraphQL
autocomplete suggestions.
If omitted, the last column number will be used.
[number]

-c, --configDir Path to the .graphqlrc.yml configuration file.
Walks up the directory tree from the provided config
directory, or the current working directory, until a
.graphqlrc is found or the root directory is found.
[string]

-s, --schemaPath a path to schema DSL file
[string]

At least one command is required.
Commands: "server, validate, autocomplete, outline"
3.3.33

4 months ago

3.3.30

4 months ago

3.3.31

4 months ago

3.3.32

4 months ago

3.3.29

4 months ago

3.3.28

6 months ago

3.3.26

8 months ago

3.3.27

8 months ago

3.3.24-alpha.0

11 months ago

3.3.24

11 months ago

3.3.25

10 months ago

3.3.23

12 months ago

3.3.18

1 year ago

3.3.19

1 year ago

3.3.20

1 year ago

3.3.21

1 year ago

3.3.22

1 year ago

3.3.16

1 year ago

3.3.17

1 year ago

3.3.15

1 year ago

3.3.9

2 years ago

3.3.8

2 years ago

3.3.7

2 years ago

3.3.6

2 years ago

3.3.13

2 years ago

3.3.14

1 year ago

3.3.10

2 years ago

3.3.11

2 years ago

3.3.12

2 years ago

3.3.5

2 years ago

3.3.4

2 years ago

3.2.24

2 years ago

3.2.26

2 years ago

3.2.25

2 years ago

3.2.28

2 years ago

3.2.27

2 years ago

3.2.29

2 years ago

3.2.30

2 years ago

3.3.1

2 years ago

3.3.0

2 years ago

3.3.3

2 years ago

3.3.2

2 years ago

3.2.23

2 years ago

3.2.22

2 years ago

3.2.20

2 years ago

3.2.21

2 years ago

3.2.15

2 years ago

3.2.17

2 years ago

3.2.16

2 years ago

3.2.19

2 years ago

3.2.18

2 years ago

3.2.9

2 years ago

3.2.8

2 years ago

3.2.7

2 years ago

3.2.13

2 years ago

3.2.12

2 years ago

3.2.14

2 years ago

3.2.11

2 years ago

3.2.10

2 years ago

3.2.2

2 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.2.6

2 years ago

3.2.5

2 years ago

3.2.4

2 years ago

3.2.3

2 years ago

3.1.14

3 years ago

3.1.13

3 years ago

3.1.12

3 years ago

3.1.11

3 years ago

3.1.10

3 years ago

3.1.9

3 years ago

3.1.8

3 years ago

3.1.7

3 years ago

3.1.6

3 years ago

3.1.5

4 years ago

3.1.4

4 years ago

3.1.3

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.1.0-alpha.5

4 years ago

3.1.0-alpha.4

4 years ago

3.1.0-alpha.3

4 years ago

3.1.0-alpha.1

4 years ago

3.1.0-alpha.2

4 years ago

3.1.0-alpha.0

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

3.0.0-alpha.5

4 years ago

3.0.0-alpha.3

4 years ago

3.0.0-alpha.2

4 years ago