open-index/open-npm huggingface dataset:
npm package: @graphjson/printer
Description: > Print GraphQL queries as formatted strings
Latest version: 0.0.1

# @graphjson/printer

> Print GraphQL queries as formatted strings

[![npm version](https://img.shields.io/npm/v/@graphjson/printer)](https://www.npmjs.com/package/@graphjson/printer)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue)](https://www.typescriptlang.org/)

GraphJSON Printer provides utilities for converting GraphQL AST nodes back into formatted query strings.

## Why Use This?

- 📄 **Pretty Printing** - Format GraphQL queries beautifully
- 🎨 **Customizable** - Control formatting options
- 🔧 **AST-Based** - Works with GraphQL AST nodes
- 🚀 **Fast** - Optimized printing algorithm
- 📦 **Lightweight** - Minimal dependencies

## Installation

```bash
npm install @graphjson/printer
```

## Quick Start

```typescript
import { print } from 'graphql';
import { generateDocument } from '@graphjson/core';

const { ast } = generateDocument({
  query: {
    users: {
      select: {
        id: true,
        name: true
      }
    }
  }
});

// Print the query
console.log(print(ast));
```

**Output:**
```graphql
query {
  users {
    id
    name
  }
}
```

## Usage

The printer is based on GraphQL's built-in `print` function and works with any GraphQL DocumentNode or AST node.

### Basic Printing

```typescript
import { print } from 'graphql';

const queryString = print(ast);
```

### With Formatting

```typescript
import { print } from 'graphql';

const formatted = print(ast);

// Result is automatically formatted with:
// - Proper indentation
// - Consistent spacing
// - Readable structure
```

## GraphJSON Ecosystem

| Package | Description | NPM |
|---------|-------------|-----|
| [@graphjson/core](https://www.npmjs.com/package/@graphjson/core) | Core document generation | [![npm](https://img.shields.io/npm/v/@graphjson/core)](https://www.npmjs.com/package/@graphjson/core) |
| [@graphjson/ast](https://www.npmjs.com/package/@graphjson/ast) | AST building utilities | [![npm](https://img.shields.io/npm/v/@graphjson/ast)](https://www.npmjs.com/package/@graphjson/ast) |

## Examples

See the [examples directory](https://github.com/NexaLeaf/graphjson/tree/main/examples) for usage examples.

## Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](https://github.com/NexaLeaf/graphjson/blob/main/CONTRIBUTING.md).

## License

MIT © [NexaLeaf](https://github.com/NexaLeaf)
npm package: @graphly/schema
Description: Create GraphQL schema/source from typemap cache.
Author: Artur Bier
Latest version: 0.10.1

# @graphly/schema

Create GraphQL schema/source from typemap cache.

This package is a part of [Graphly](https://github.com/graphly/graphly) project and uses by
`@graphly/type` to convert TypeScript classes to GraphQL schema.

## Install

`yarn add @graphly/schema`

## Usage

```typescript
import {Project} from "@graphly/schema";
import {MySchema} from "./Schema/MySchema.ts"

async function main() {
    const project = await Project.from(MySchema.getSchemaLocation());
    
    // convert project to GraphQL format
    console.log(project.toGraphQL());
    
    // convert project to GraphQLSchema
    console.log(project.toSchema());
}

main();
```

## Links

Read more about [this project](https://github.com/graphly/graphly).

## License
MIT
npm package: @graphly/type
Description: A type library for GraphQL schema generation by TypeScript
Author: Artur Bier
Latest version: 0.10.1

# @graphly/type

A type library for GraphQL schema generation by TypeScript.

This package is a part of [Graphly](https://github.com/graphly/graphly) project and uses to define
GraphQL schema by TypeScript.

## Install

`yarn add @graphly/type`

## Usage

See usage and examples on the [GitHub page](https://github.com/graphly/graphly).

## License
MIT