sogko/graphql-schema-language-cheat-sheet

Markdown version

Koleok opened this issue · 2 comments

Have you considered adding a markdown version? I'd be glad to do it if necessary I just think it would add value to this project as far as being at least Cmd/Ctrl+F searchable but also providing permalinks to sections and lines.

sogko commented

Hi @Koleok

That's actually a great idea! If you are considering creating a PR, I'd be more than happy to accept it and include it here.

And I just found out that Github's markdown accepts 'graphql' format for its code-fencing and a quick test below seems to be working great.

Do let me know if you want to pursue this, that'd be great 👍

interface Test {
  id: String
}
type Name {
 id: String
}

type User implements Test {
 id: String
 friend: Boolean
}
input Input {
 val: Int
}
scalar Url

schema {
 query: Query
 mutation: Mutation

}

Take a look @sogko! I tweaked a few things specifically in the table descriptions and took the opportunity to link to the official schema docs where applicable. You had some nice color coding between the keyword tables and syntax highlighting in your image which I am sure we could find a way to retain (like wrapping span tags with inline styles around the keywords I think?), I was not sure how off the top of my head since I am no .md expert.