@certik/skynet 0.18.2 → 0.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.18.3
4
+
5
+ - BREAKING: remove url from graphql.js interface
6
+
3
7
  ## 0.18.2
4
8
 
5
9
  - BREAKING: remove appName from search.js interface
package/graphql.js CHANGED
@@ -1,10 +1,8 @@
1
- const GRAPHQL_API_KEY = process.env.SKYNET_GRAPHQL_API_KEY || process.env.GRAPHQL_API_KEY;
2
-
3
- export async function gql(url, query, variables = {}) {
4
- const res = await fetch(url, {
1
+ export async function gql(query, variables = {}) {
2
+ const res = await fetch(process.env.SKYNET_GRAPHQL_ENDPOINT, {
5
3
  method: "POST",
6
4
  headers: {
7
- "x-api-key": GRAPHQL_API_KEY,
5
+ "x-api-key": process.env.SKYNET_GRAPHQL_API_KEY,
8
6
  "content-type": "application/json",
9
7
  },
10
8
  body: JSON.stringify({ query: query.trim(), variables }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.18.2",
3
+ "version": "0.18.3",
4
4
  "description": "Skynet Shared JS library",
5
5
  "type": "module",
6
6
  "main": "index.js",