RunKit + npm: graphql-json-schema

node v6.17.1
version: master
endpointsharetweet
var graphqlJsonSchema = require("graphql-json-schema") const schema = graphqlJsonSchema(` type Query { documents: [Document!]! document(id: Int): Document! } interface Document { id: Int! title: String! } type Article implements Document { id: Int! title: String! featured: Boolean! sections: [ArticleSection!]! } union ArticleSection = TextSection | PhotoSection | VideoSection type TextSection { content: String! heading: String } type PhotoSection { sourceUrl: String! linkUrl: String caption: String content: String } type VideoSection { url: String! } type Roundup implements Document { id: Int! title: String! isAward: Boolean! intro: String hotels: [RoundupHotel!]! } type RoundupHotel { url: String! photoUrl: String @deprecated(reason: "photoUrl is deprecated; use photos") photos: [RoundupPhoto!]! blurb: String! title: String } type RoundupPhoto { url: String! caption: String }`) console.log(schema)
Created from: https://npm.runkit.com/graphql-json-schema
Loading…

no comments

    sign in to comment