gatsby-plugin-altair-graphql 5.0.8 → 5.0.14
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/README.md +1 -1
- package/package.json +6 -4
- package/src/gatsby-node.ts +12 -6
- package/tsconfig.json +3 -7
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-plugin-altair-graphql",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.14",
|
|
4
4
|
"description": "A gatsby plugin for using Altair GraphQL client",
|
|
5
5
|
"main": "gatsby-node.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,14 +25,16 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/altair-graphql/altair#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"
|
|
28
|
+
"@types/express": "^4.17.15",
|
|
29
|
+
"express": "^4.18.2",
|
|
30
|
+
"typescript": "^4.9.4"
|
|
29
31
|
},
|
|
30
32
|
"dependencies": {
|
|
31
|
-
"altair-express-middleware": "^5.0.
|
|
33
|
+
"altair-express-middleware": "^5.0.14"
|
|
32
34
|
},
|
|
33
35
|
"funding": {
|
|
34
36
|
"type": "opencollective",
|
|
35
37
|
"url": "https://opencollective.com/altair"
|
|
36
38
|
},
|
|
37
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "973420e96faf2c099c806a26a119659c10c0f4ee"
|
|
38
40
|
}
|
package/src/gatsby-node.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { altairExpress } from 'altair-express-middleware';
|
|
2
|
+
import { Application } from 'express';
|
|
2
3
|
|
|
3
|
-
export const onCreateDevServer = ({ app }) => {
|
|
4
|
-
app.use(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export const onCreateDevServer = ({ app }: { app: Application }) => {
|
|
5
|
+
app.use(
|
|
6
|
+
'/___altair',
|
|
7
|
+
altairExpress({
|
|
8
|
+
endpointURL: '/___graphql',
|
|
9
|
+
initialQuery: `# GATSBY + ALTAIR GRAPHQL ❤️.\n# Enter your graphQL query here.`,
|
|
10
|
+
})
|
|
11
|
+
);
|
|
8
12
|
|
|
9
|
-
console.log(
|
|
13
|
+
console.log(
|
|
14
|
+
'\nYippee! 🎉 Altair GraphQL Client is now running at `/___altair`\n'
|
|
15
|
+
);
|
|
10
16
|
};
|
package/tsconfig.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
4
|
"outDir": ".",
|
|
4
5
|
"rootDir": "src",
|
|
@@ -6,13 +7,8 @@
|
|
|
6
7
|
"target": "es2020",
|
|
7
8
|
"module": "commonjs",
|
|
8
9
|
"sourceMap": true,
|
|
9
|
-
"lib": [
|
|
10
|
-
|
|
11
|
-
"esnext"
|
|
12
|
-
],
|
|
13
|
-
"types": [
|
|
14
|
-
"node"
|
|
15
|
-
]
|
|
10
|
+
"lib": ["dom", "esnext"],
|
|
11
|
+
"types": ["node"]
|
|
16
12
|
},
|
|
17
13
|
"include": ["src"],
|
|
18
14
|
"exclude": []
|