Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Graphql Printer Laravel Package

lastdragon-ru/graphql-printer

GraphQL printer for PHP: turns a GraphQL AST/document into well-formatted GraphQL text with configurable indentation and style. Useful for debugging, logging, code generation, and producing consistent query/schema output in Laravel or any PHP app.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Schema Documentation & Self-Service Tools: Enable developers to auto-generate human-readable GraphQL schema documentation (e.g., for internal wikis, developer portals, or API hubs) without manual effort. Reduces technical debt in maintaining README.md or Swagger-like docs.
  • Debugging & Onboarding: Accelerate debugging by printing only relevant types/directives (e.g., for a specific query) during development. Simplify onboarding by providing clean, filtered schema snippets for new team members.
  • Customization Over Generics: Justify building vs. buying by avoiding generic tools (e.g., GraphiQL’s built-in schema introspection) when needing fine-grained control (e.g., hiding deprecated fields, omitting unused types, or enforcing consistent formatting).
  • Performance Optimization: Identify unused types/directives in the schema to streamline queries (e.g., for mobile apps or edge caching) by surfacing "dead code" in the GraphQL layer.
  • Compliance & Auditing: Generate audit-ready schema snapshots (e.g., for GDPR data flow mapping) by filtering types/directives by usage or custom tags.

When to Consider This Package

  • Look Here If:

    • Your team manually maintains GraphQL schema docs or relies on third-party tools (e.g., GraphQL Playground) that lack customization.
    • You need to exclude unused types/directives from documentation (e.g., for security, simplicity, or performance).
    • Your schema is large/complex (e.g., >50 types), making introspection overwhelming without filtering.
    • You require consistent formatting across schema outputs (e.g., for CI/CD pipelines or style guides).
    • You’re building a developer portal or internal tool where schema exploration is a key feature.
  • Look Elsewhere If:

    • You only need basic schema introspection (e.g., GraphiQL or Apollo Studio suffice).
    • Your stack doesn’t use PHP/Laravel (this package is PHP-specific).
    • You prioritize real-time collaboration over static schema exports (consider GraphQL IDEs like GraphQL Playground).
    • Your schema is tiny (<10 types) and stable, making manual docs manageable.
    • You need visual schema tools (e.g., diagrams, relationships) instead of text-based outputs.

How to Pitch It (Stakeholders)

For Executives: "This package lets us automate and customize GraphQL schema documentation—saving dev time and reducing errors. For example, we can generate clean, filtered schema snippets for our mobile team to debug queries faster, or publish only the public API surface for partners. It’s a low-cost way to improve developer productivity and API maintainability, with no vendor lock-in (MIT license)."

For Engineers: *"Need to ship schema docs without manual work? This package lets you:

  • Print only used types/directives (no cruft).
  • Customize indentation, formatting, and exclusions (e.g., hide internal fields).
  • Integrate into CI/CD for audit-ready schema snapshots. It’s a lightweight PHP tool that plugs into Laravel—no heavy dependencies. Perfect for teams tired of copying-pasting schema introspection results."*

For Developers: *"Tired of graphql introspection dumping 500 lines of unused types? This package lets you:

// Print only types used in a specific query
SchemaPrinter::printUsedTypes($queryAst);

// Format schema with your team’s preferred style
SchemaPrinter::printAllTypes(indent: 2, showDirectives: false);

It’s like jq for GraphQL schemas—filter, format, and focus on what matters."*

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky