@smartive/graphql-magic 5.1.2 → 6.0.0
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 +1 -6
- package/dist/esm/context.d.ts +3 -0
- package/package.json +1 -1
- package/src/context.ts +2 -0
- package/tests/unit/resolve.spec.ts +1 -0
- package/tests/utils/server.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
### Bug Fixes
|
|
5
|
-
|
|
6
|
-
* Schema generation again ([4e8c6cd](https://github.com/smartive/graphql-magic/commit/4e8c6cd1cf5639430e02077f506c66fdcbc01288))
|
|
1
|
+
# [6.0.0](https://github.com/smartive/graphql-magic/compare/v5.1.2...v6.0.0) (2023-08-25)
|
package/dist/esm/context.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { DocumentNode, GraphQLResolveInfo } from 'graphql';
|
|
3
|
+
import { IncomingMessage } from 'http';
|
|
2
4
|
import { Knex } from 'knex';
|
|
3
5
|
import { DateTime } from 'luxon';
|
|
4
6
|
import { Entity, Models, MutationHook, RawModels } from './models/models';
|
|
@@ -9,6 +11,7 @@ export type User = {
|
|
|
9
11
|
role: string;
|
|
10
12
|
};
|
|
11
13
|
export type Context = {
|
|
14
|
+
req: IncomingMessage;
|
|
12
15
|
now: DateTime;
|
|
13
16
|
knex: Knex;
|
|
14
17
|
document: DocumentNode;
|
package/package.json
CHANGED
package/src/context.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DocumentNode, GraphQLResolveInfo } from 'graphql';
|
|
2
|
+
import { IncomingMessage } from 'http';
|
|
2
3
|
import { Knex } from 'knex';
|
|
3
4
|
import { DateTime } from 'luxon';
|
|
4
5
|
import { Entity, Models, MutationHook, RawModels } from './models/models';
|
|
@@ -9,6 +10,7 @@ import { AliasGenerator } from './resolvers/utils';
|
|
|
9
10
|
export type User = { id: string; role: string };
|
|
10
11
|
|
|
11
12
|
export type Context = {
|
|
13
|
+
req: IncomingMessage;
|
|
12
14
|
now: DateTime;
|
|
13
15
|
knex: Knex;
|
|
14
16
|
document: DocumentNode;
|
|
@@ -23,6 +23,7 @@ const test = async (operationName: string, query: string, variables: object, res
|
|
|
23
23
|
|
|
24
24
|
const user = await knexInstance('User').where({ id: 1 }).first();
|
|
25
25
|
const result = await execute({
|
|
26
|
+
req: null as any,
|
|
26
27
|
knex: knexInstance,
|
|
27
28
|
locale: 'en',
|
|
28
29
|
locales: ['en'],
|