Name: fetch-graphql-schema
Owner: YOCTOL INFO INC.
Description: fetch GraphQL schema via introspection query
Created: 2016-11-11 14:03:55.0
Updated: 2017-12-01 16:15:55.0
Pushed: 2016-11-22 10:49:40.0
Homepage: null
Size: 12
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
fetch GraphQL schema via introspection query
m install fetch-graphql-schema
t fetchSchema = require('fetch-graphql-schema');
hSchema('http://localhost:8080/graphql')
hen(schemaJSON => {
/**
* {
* "data": {
* "__schema": {
* "queryType": {
* "name": "Query"
* ....
*/
;
hSchema('http://localhost:8080/graphql', { readable: true })
hen(clientSchema => {
/**
* type User implements Node {
* id: ID!
* name: String!
* }
*/
;
Required
Type: string
URL of GraphQL server.
Type: boolean
Default: false
resolve .graphql
instead of .json
.
tch-graphql-schema <schemaUrl>
--output Specify an output filename.
--readable Resolve .graphql instead of .json.
tch-graphql-schema http://api.server/graphql -o schema.json
tch-graphql-schema http://api.server/graphql -o schema.graphql -r
MIT © C.T. Lin