diff --git a/README.md b/README.md index a25a84646e18..2f7ced2ee6d4 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/content/graphql/README.md b/content/graphql/README.md new file mode 100644 index 000000000000..f29fbc513144 --- /dev/null +++ b/content/graphql/README.md @@ -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.** diff --git a/content/graphql/overview/explorer.md b/content/graphql/overview/explorer.md index f87b12b44eef..74540b78a43a 100644 --- a/content/graphql/overview/explorer.md +++ b/content/graphql/overview/explorer.md @@ -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. diff --git a/content/rest/README.md b/content/rest/README.md new file mode 100644 index 000000000000..55aaa5edda1d --- /dev/null +++ b/content/rest/README.md @@ -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.** diff --git a/layouts/graphql-explorer.html b/layouts/graphql-explorer.html new file mode 100644 index 000000000000..3ce766324195 --- /dev/null +++ b/layouts/graphql-explorer.html @@ -0,0 +1,33 @@ + + + {% include head %} + + + {% include sidebar %} + +
+ {% include header %} + +
+
+
+
+ {% include breadcrumbs %} +
+
+ +
+
+ +
+
+
+
+ + {% include support %} + {% include small-footer %} +
+ + diff --git a/middleware/contextualizers/graphql.js b/middleware/contextualizers/graphql.js index 34fffaf1e245..b5a1f7cc202d 100644 --- a/middleware/contextualizers/graphql.js +++ b/middleware/contextualizers/graphql.js @@ -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'