Socket
Socket
Sign inDemoInstall

graphql-language-service-interface

Package Overview
Dependencies
Maintainers
13
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-language-service-interface

Interface to the GraphQL Language Service


Version published
Weekly downloads
93K
decreased by-19.17%
Maintainers
13
Weekly downloads
 
Created

What is graphql-language-service-interface?

The graphql-language-service-interface package provides a set of tools and utilities to support GraphQL language services, such as autocompletion, error checking, and more. It is designed to be used in IDEs and other development environments to enhance the GraphQL development experience.

What are graphql-language-service-interface's main functionalities?

Autocomplete

This feature provides autocompletion suggestions for a given GraphQL query at a specific cursor position. It helps developers by suggesting possible fields, types, and other GraphQL constructs.

const { getAutocompleteSuggestions } = require('graphql-language-service-interface');
const schema = /* GraphQLSchema object */;
const query = '{ user { na } }';
const position = { line: 0, character: 10 };
const suggestions = getAutocompleteSuggestions(schema, query, position);
console.log(suggestions);

Diagnostics

This feature provides diagnostic information for a given GraphQL query, such as syntax errors and validation issues against the provided schema. It helps developers identify and fix issues in their GraphQL queries.

const { getDiagnostics } = require('graphql-language-service-interface');
const schema = /* GraphQLSchema object */;
const query = '{ user { name } }';
const diagnostics = getDiagnostics(query, schema);
console.log(diagnostics);

Hover Information

This feature provides hover information for a given GraphQL query at a specific cursor position. It helps developers by showing detailed information about the GraphQL types, fields, and other constructs under the cursor.

const { getHoverInformation } = require('graphql-language-service-interface');
const schema = /* GraphQLSchema object */;
const query = '{ user { name } }';
const position = { line: 0, character: 7 };
const hoverInfo = getHoverInformation(schema, query, position);
console.log(hoverInfo);

Other packages similar to graphql-language-service-interface

Keywords

FAQs

Package last updated on 06 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc