Skip to content

g-plane/pretty_graphql

Repository files navigation

Pretty GraphQL

Pretty GraphQL is a configurable GraphQL formatter.

GitHub Downloads

Getting Started

dprint

We've provided dprint integration.

Run the command below to add plugin:

dprint config add g-plane/pretty_graphql

After adding the dprint plugin, update your dprint.json and add configuration:

{
  // ...
  "graphql": { // <-- the key name here is "graphql", not "pretty_graphql"
    // Pretty GraphQL config comes here
  },
  "plugins": [
    "https://plugins.dprint.dev/g-plane/pretty_graphql-v0.2.1.wasm"
  ]
}

You can also read dprint CLI documentation for using dprint to format files.

Configuration

Please read configuration documentation.

Using in Rust

To use Pretty GraphQL in Rust, please read the documentation.

Credit

Tests come from Prettier.

License

MIT License

Copyright (c) 2024-present Pig Fang