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?
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?