Skip to content

Introspect only defined types, like schema_printer? #778

@flewellyn

Description

@flewellyn

I'm trying to generate a GraphQL schema output that can be easily serialized as JSON. The schema_printer.print_schema() function from graphql.utils creates a very pretty human-readable schema rendering, but it's not very machine-readable without a lot of reparsing. On the other hand, the schema.introspect() method returns a full introspection schema, which is machine-readable, but contains a lot of unnecessary elements, such as definitions for the standared scalars.

What would be a good way to generate something like the latter, but which only shows the non-standard types defined on the schema, like the former?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions