gatsby-source-graphql
Advanced tools
Comparing version 1.0.0 to 1.1.0
## Change Log | ||
### [v1.1.0](https://github.com/wyze/gatsby-source-graphql/releases/tag/v1.1.0) (2018-06-05) | ||
* [[`67d99754ad`](https://github.com/wyze/gatsby-source-graphql/commit/67d99754ad)] - Allow a promise for asynchronously loading options (#4) (Judah Anthony) | ||
* [[`4471e2c221`](https://github.com/wyze/gatsby-source-graphql/commit/4471e2c221)] - Improve usage instructions (#3) (Tomasz Radziejewski) | ||
### [v1.0.0](https://github.com/wyze/gatsby-source-graphql/releases/tag/v1.0.0) (2018-05-06) | ||
* [[`bc71c4baf4`](https://github.com/wyze/gatsby-source-graphql/commit/bc71c4baf4)] - Initial commit (Neil Kistner) |
{ | ||
"name": "gatsby-source-graphql", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "A Gatsby source plugin for pulling in data from GraphQL APIs.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -30,2 +30,7 @@ # gatsby-source-graphql | ||
// Optionally pull in environment variables | ||
require('dotenv').config({ | ||
path: `.env.${process.env.NODE_ENV}`, | ||
}); | ||
module.exports = { | ||
@@ -54,2 +59,27 @@ // ... | ||
```graphql | ||
# src/queries/github.graphql | ||
{ | ||
viewer { | ||
name | ||
url | ||
} | ||
} | ||
``` | ||
### How to query | ||
Given the above example with a GraphQL file named `github.graphql`, you would query Gatsby like so: | ||
```graphql | ||
query GitHubViewerQuery { | ||
githubGraphQl { | ||
viewer { | ||
name | ||
url | ||
} | ||
} | ||
} | ||
``` | ||
## Change Log | ||
@@ -59,5 +89,6 @@ | ||
### [v1.0.0](https://github.com/wyze/gatsby-source-graphql/releases/tag/v1.0.0) (2018-05-06) | ||
### [v1.1.0](https://github.com/wyze/gatsby-source-graphql/releases/tag/v1.1.0) (2018-06-05) | ||
* [[`bc71c4baf4`](https://github.com/wyze/gatsby-source-graphql/commit/bc71c4baf4)] - Initial commit (Neil Kistner) | ||
* [[`67d99754ad`](https://github.com/wyze/gatsby-source-graphql/commit/67d99754ad)] - Allow a promise for asynchronously loading options (#4) (Judah Anthony) | ||
* [[`4471e2c221`](https://github.com/wyze/gatsby-source-graphql/commit/4471e2c221)] - Improve usage instructions (#3) (Tomasz Radziejewski) | ||
@@ -64,0 +95,0 @@ ## License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23786
104