Skip to content

Instantly share code, notes, and snippets.

@AetherDevSecOps
AetherDevSecOps / pretty_print_introspection.js
Created April 25, 2021 05:24
Pretty print GraphQL API Schema Introspection Results
function resolveType(type){
var stack = []
var current = type;
while(current != null) {
stack.push({kind:current.kind, name:current.name})
current = current.ofType;
}
var output = "";
@AetherDevSecOps
AetherDevSecOps / introspection.graphql
Last active April 29, 2021 03:38
GraphQL Get Entire Schema Using Introspection
__schema {
description
queryType {
kind
name
}
mutationType {
kind
name
}