1.0.22 • Published 2 years ago

graphqlvisualizer v1.0.22

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Description:

GraphQlVisualizer is a tool that enables you to visualize existing GraphQL schemas. It lets you explore all aspects of a schema without the need of a functional serverice side. Simply load your schema froma a local file or from a string and get a generated html page, wich will contain graphical representaion of your scehma in a simple, intuitive and interavctive UI.

File will be generated inside src/generated directory, under the name of schemaVisualized.html

Functionalities:

  1. Visualize schema from local file
  2. Visualize schema from string

Installation:

Install using NPM

npm install --save graphqlvisualizer

Usage:

Below is an example of how this package could be used

import GenerateHtmlFromString from "graphqlvisualizer";

var schemaString = `
type User{
    id:ID!
    firstname:String
    lastname:String
    address:Address
}
type Address{
    postalCode:Int
    city:String
}
type Query{
    """
    Returns user with specified id
    """
    user(id: ID): User
    """
    Returns a list of users that have the specified address
    """
    usersOnAddress(address: Address): [User]
}
type Mutation{
    createAddress(postalCode:Int!, city:String): Address
    deleteUser(id:ID):Boolean
}
`;

var schema = GenerateHtmlFromString(schemaString);

Example

This is what generated UI would look like with a list of all defined types: image

Expanded query or mutation would look like image below image

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago