Nine Post Meridiem

    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
    }
     
    */
     

    Install

    npm i graphql-formatter

    DownloadsWeekly Downloads

    1,352

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    4.21 kB

    Total Files

    6

    Last publish

    Collaborators

    • yizhi