Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ There are a few more things to know when you're getting started with this repo:
In addition to the README you're reading right now, this repo includes other READMEs that describe the purpose of each subdirectory in more detail:

- [content/README.md](content/README.md)
- [content/graphql/README.md](content/graphql/README.md)
- [content/rest/README.md](content/rest/README.md)
- [contributing/README.md](contributing/README.md)
- [data/README.md](data/README.md)
- [data/reusables/README.md](data/reusables/README.md)
Expand Down
10 changes: 10 additions & 0 deletions content/graphql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# GraphQL

The `/content/graphql` directory is where the GitHub GraphQL API docs live!

* The `/content/graphql/guides` and `/content/graphql/overview` directories contain articles that are human-editable.
* The `/content/graphql/reference` directory contains an article for each GraphQL data type used in the GitHub GraphQL API. Most of the content in this directory is rendered using `include` tags.

The content rendered by `include` tags is sourced from the `/lib/graphql/static` directory, which is automatically generated from the API source code internally in GitHub, and should not be edited by a human. For more information, see the [`/lib/graphql/README.md`](/lib/graphql/README.md).

**As a result, we cannot accept contributions to GraphQL API reference content in this repository.**
2 changes: 1 addition & 1 deletion content/graphql/overview/explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ versions:
free-pro-team: '*'
enterprise-server: '*'
github-ae: '*'
layout: graphql-explorer
---

You can access GitHub's GraphQL Explorer at https://developer.github.com/v4/explorer.
10 changes: 10 additions & 0 deletions content/rest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# REST

The `/content/rest` directory is where the GitHub REST API docs live!

* The `/content/rest/guides` and `/content/rest/overview` directories contain regular articles. These are human-editable.
* The `/content/rest/reference` directory contains an article for each group of endpoints in the GitHub REST API. Most of the content in this directory is rendered using `include` tags.

The content rendered by `include` tags is sourced from the `/lib/rest/static` directory, which is automatically generated from the API source code internally in GitHub, and should not be edited by a human. For more information, see the [`/lib/rest/README.md`](/lib/rest/README.md).

**As a result, we cannot accept contributions to REST API reference content in this repository.**
33 changes: 33 additions & 0 deletions layouts/graphql-explorer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!doctype html>
<html lang="{{currentLanguage}}">
{% include head %}

<body class="d-lg-flex">
{% include sidebar %}

<main class="width-full">
{% include header %}

<main class="container-xl px-3 px-md-6 my-4 my-lg-4 d-xl-flex">
<article class="markdown-body width-full">
<div class="d-lg-flex flex-justify-between">
<div class="d-flex flex-items-center" style="height: 39px;">
{% include breadcrumbs %}
</div>
</div>

<div class="mt-2">
<div>
<iframe id="graphiql" class="graphql-explorer" scrolling="no" src="{{ graphql.explorerUrl }}">
<p>You must have iframes enabled to use this feature.</p>
</iframe>
</div>
</div>
</article>
</main>

{% include support %}
{% include small-footer %}
</main>
</body>
</html>
1 change: 0 additions & 1 deletion middleware/contextualizers/graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const changelog = require('../../lib/graphql/static/changelog')
const prerenderedObjects = require('../../lib/graphql/static/prerendered-objects')
const allVersions = require('../../lib/all-versions')

// TODO do we need to support staging? https://graphql-stage.github.com/explorer
const explorerUrl = process.env.NODE_ENV === 'production'
? 'https://graphql.github.com/explorer'
: 'http://localhost:3000'
Expand Down