graphql-formatter
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

graphql-formatter

A simple graphql formatter

Tip: it will keep structure of source code

installation

npm install graphql-formatter

usage

import { format } from 'graphql-formatter'
 
const gql = `
type User{
id:ID!
                name: String
}
`
 
const result = format(gql)
/*
result is:
 
type User {
    id: ID!
    name: String
}
 
*/
 

Package Sidebar

Install

npm i graphql-formatter

Weekly Downloads

918

Version

1.0.3

License

ISC

Unpacked Size

4.21 kB

Total Files

6

Last publish

Collaborators

  • yizhi