const { buildSchema } = require('graphql'); module.exports = buildSchema(` type Post{ _id:ID! title:String! content:String! imageUrl:String! creator:User! createdAt:String! updatedAt:String! } type User{ _id:ID! email: String! name: String! password: String! status: String! post: [Post!]! } input UserInputData{ email: String! name: String! password: String! } type RootMutation{ createUser(userInput:UserInputData):User! } type RootQuery{ hello: String } schema{ query: RootQuery mutation: RootMutation } `)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter