altair-fastify-plugin 5.0.9 → 5.0.15
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/example/mercurius.js +5 -5
- package/example/mercurius.ts +6 -6
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -23,3 +23,4 @@ export interface AltairFastifyPluginOptions extends RenderOptions {
|
|
|
23
23
|
}
|
|
24
24
|
declare const _default: FastifyPluginCallback<AltairFastifyPluginOptions, import("http").Server, import("fastify").FastifyTypeProviderDefault>;
|
|
25
25
|
export default _default;
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAGL,aAAa,EAEd,MAAM,eAAe,CAAC;AAIvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,WAAW,0BAA2B,SAAQ,aAAa;IAC/D;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;;AAmCD,wBAGG"}
|
package/example/mercurius.js
CHANGED
|
@@ -13,8 +13,8 @@ const schema = `
|
|
|
13
13
|
|
|
14
14
|
const resolvers = {
|
|
15
15
|
Query: {
|
|
16
|
-
add: async (_, { x, y }) => x + y
|
|
17
|
-
}
|
|
16
|
+
add: async (_, { x, y }) => x + y,
|
|
17
|
+
},
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
app.register(mercurius, {
|
|
@@ -22,7 +22,7 @@ app.register(mercurius, {
|
|
|
22
22
|
resolvers,
|
|
23
23
|
graphiql: false,
|
|
24
24
|
ide: false,
|
|
25
|
-
path: '/graphql'
|
|
25
|
+
path: '/graphql',
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
app.register(AltairFastify, {
|
|
@@ -40,10 +40,10 @@ app.register(AltairFastify, {
|
|
|
40
40
|
query {
|
|
41
41
|
add(x: 1, y: 2)
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
`,
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
app.get('/', async function(req, reply) {
|
|
46
|
+
app.get('/', async function (req, reply) {
|
|
47
47
|
const query = '{ add(x: 2, y: 2) }';
|
|
48
48
|
return reply.graphql(query);
|
|
49
49
|
});
|
package/example/mercurius.ts
CHANGED
|
@@ -5,8 +5,8 @@ import AltairFastify from '../dist';
|
|
|
5
5
|
|
|
6
6
|
const app = Fastify({
|
|
7
7
|
logger: {
|
|
8
|
-
level: 'info'
|
|
9
|
-
}
|
|
8
|
+
level: 'info',
|
|
9
|
+
},
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
const schema = `
|
|
@@ -17,8 +17,8 @@ const schema = `
|
|
|
17
17
|
|
|
18
18
|
const resolvers = {
|
|
19
19
|
Query: {
|
|
20
|
-
add: async (_: unknown, { x, y }: { x: number; y: number }) => x + y
|
|
21
|
-
}
|
|
20
|
+
add: async (_: unknown, { x, y }: { x: number; y: number }) => x + y,
|
|
21
|
+
},
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
app.register(mercurius, {
|
|
@@ -26,7 +26,7 @@ app.register(mercurius, {
|
|
|
26
26
|
resolvers,
|
|
27
27
|
graphiql: false,
|
|
28
28
|
ide: false,
|
|
29
|
-
path: '/graphql'
|
|
29
|
+
path: '/graphql',
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
app.register(AltairFastify, {
|
|
@@ -44,7 +44,7 @@ app.register(AltairFastify, {
|
|
|
44
44
|
query {
|
|
45
45
|
add(x: 1, y: 2)
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
`,
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
app.listen({ port: 3000 });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "altair-fastify-plugin",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.15",
|
|
4
4
|
"description": "Fastify Plugin of Altair GraphQL Client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graphql",
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@fastify/static": "^6.4.0",
|
|
35
|
-
"altair-static": "^5.0.
|
|
35
|
+
"altair-static": "^5.0.15",
|
|
36
36
|
"fastify-plugin": "^2.3.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"fastify": "^4.0.3",
|
|
40
|
-
"mercurius": "^
|
|
40
|
+
"mercurius": "^11.5.0",
|
|
41
41
|
"ts-node": "^9.0.0",
|
|
42
|
-
"typescript": "^4.
|
|
42
|
+
"typescript": "^4.9.4"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"fastify": "^4.0.3"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "a460a8fcb8c3573ae4989769565f354ffdb92102"
|
|
48
48
|
}
|