Skip to content

cosad3s/graphql-introspection-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL Introspection Converter

Simple converter for GraphQL introspection JSON to schema (SDL).

Configuration

npm install

Usage

node index.js /path/to/introspection.json

The generated SDL schema will be generated in current folder under a name like schema-*.graphql.

Credits

Thanks to:

Tips

Generate queries, mutations ... from schema:

With gql-generator:

gqlg --schemaFilePath ./schema-1680004349192.graphql --destDirPath ./output/

Introspection query:

{__schema{queryType{name}mutationType{name}subscriptionType{name}types{...FullType}directives{name description locations args{...InputValue}}}}fragment FullType on __Type{kind name description fields(includeDeprecated:true){name description args{...InputValue}type{...TypeRef}isDeprecated deprecationReason}inputFields{...InputValue}interfaces{...TypeRef}enumValues(includeDeprecated:true){name description isDeprecated deprecationReason}possibleTypes{...TypeRef}}fragment InputValue on __InputValue{name description type{...TypeRef}defaultValue}fragment TypeRef on __Type{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name ofType{kind name}}}}}}}}

About

Simple converter for GraphQL introspection JSON to schema

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published