Skip to content

Commit

Permalink
Testing out graphql examples in schema with highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
johanventer committed Aug 17, 2022
1 parent 08d4392 commit 303b219
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/assets/js/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ export function contentInit() {
hljs.configure({ cssSelector: "pre code.hljs" });
hljs.registerLanguage("curl", hljsCurl);
hljs.highlightAll();
console.log("INITIALISED HIGHLIGHTING");
}, 1);
} catch (e) {
console.error("Jquery plugins failure", e);
Expand Down
6 changes: 5 additions & 1 deletion src/assets/stylesheets/_basics.less
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ a:visited {

.docs code {
color: darken(#dd1144, 20%);
background-color: inherit !important;
}

pre code.hljs {
background-color: inherit;
padding: 0;
}

// Monospace spans are used for URLs and other pseudo-code like blocks
Expand Down
15 changes: 14 additions & 1 deletion src/graphql/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,20 @@ type Query {
# The mathematic identity function. Useful for returning input variables.
identityFunction(value: RSJsonNode): RSJsonNode @hidden
"""
Lookup a user by its id and accountId
Lookup a user by their \`id\` and \`accountId\`.
#### Example
\`\`\`graphql
query {
user(id: "myuser", accountId: "myuser") {
id
accountId
firstName
lastName
email
}
}
\`\`\`
"""
user(
"""The user's account id"""
Expand Down

0 comments on commit 303b219

Please sign in to comment.