mirror of
https://github.com/BradNut/graphbrainz
synced 2025-09-08 17:40:32 +00:00
Fix broken markdown
This commit is contained in:
parent
d60a7eee0c
commit
593ac5a01f
4 changed files with 11928 additions and 11928 deletions
1682
docs/types.md
1682
docs/types.md
File diff suppressed because it is too large
Load diff
22160
schema.json
22160
schema.json
File diff suppressed because it is too large
Load diff
|
|
@ -3,7 +3,7 @@ import schema from '../src/schema'
|
|||
|
||||
if (process.argv[2] === '--json') {
|
||||
graphql(schema, introspectionQuery).then(result => {
|
||||
console.log(JSON.stringify(result, null, 2))
|
||||
console.log(JSON.stringify(result.data, null, 2))
|
||||
}).catch(err => {
|
||||
console.error(err)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import marked from 'marked'
|
||||
const schema = require('../schema.json').data.__schema
|
||||
const schema = require('../schema.json').__schema
|
||||
|
||||
// Ideally, we could just spit out the existing description Markdown everywhere
|
||||
// and leave it to be rendered by whatever processes the output. But some
|
||||
|
|
@ -55,10 +55,12 @@ function renderObject (type, { skipTitle = false } = {}) {
|
|||
console.log('</thead><tbody>')
|
||||
type.fields.forEach(field => {
|
||||
console.log(' <tr>')
|
||||
console.log(` <td colspan="2" valign="top"><strong>${field.name}</strong> ${field.isDeprecated ? '⚠️' : ''}</td>`)
|
||||
console.log(` <td colspan="2" valign="top"><strong>${field.name}</strong>${field.isDeprecated ? ' ⚠️' : ''}</td>`)
|
||||
console.log(` <td valign="top">${markdown(renderType(field.type))}</td>`)
|
||||
console.log(` <td>`)
|
||||
console.log(` ${markdown(field.description)}`)
|
||||
if (field.description) {
|
||||
console.log(markdown(field.description))
|
||||
}
|
||||
if (field.isDeprecated) {
|
||||
console.log(' <br/><br/><p>⚠️ <strong>DEPRECATED</strong></p>')
|
||||
console.log(` <blockquote>${markdown(field.deprecationReason)}</blockquote>`)
|
||||
|
|
@ -135,7 +137,9 @@ enums.forEach(type => {
|
|||
console.log(' <tr>')
|
||||
console.log(` <td valign="top"><strong>${value.name}</strong>${value.isDeprecated ? ' ⚠️' : ''}</td>`)
|
||||
console.log(' <td>')
|
||||
console.log(` ${markdown(value.description)}`)
|
||||
if (value.description) {
|
||||
console.log(markdown(value.description))
|
||||
}
|
||||
if (value.isDeprecated) {
|
||||
console.log(' <br/><br/><p>⚠️ <strong>DEPRECATED</strong></p>')
|
||||
console.log(` <blockquote>${markdown(value.deprecationReason)}</blockquote>`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue