New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

graphql-introspect-parse

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-introspect-parse

Parser for Graphql introspection result (JSON)

latest
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

graphql-introspect-parse

Parser for GraphQL Introspection Schema (JSON)

Installation

npm install graphql-introspect-parse --save

Usage

import { getSchemaJson, GqlType } from 'graphql-introspect-parse';
var schema: GraphQLSchema = *** // comes from makeExecutableSchema and so on
var json = getSchemaJson(schema)
var query = json.getQuery('users')
console.log('users query returns List?: '+query.getReturnType().isList()) // returns true or false

Reference

FunctionDescription
getSchemaJson(GraphQLSchema): GqlSchemaReturns JSON format introspection schema
GqlSchema.getType(name:string): GqlTypeReturns type information
GqlType.isList()Returns if the type is LIST
GqlSchema.getQuery(name: string): GqlFieldReturns query information
GqlField.getReturnType(): GqlTypeReturns query return type

Keywords

graphql

FAQs

Package last updated on 20 Nov 2018

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