naystack 1.1.12-beta.17 → 1.1.12-beta.19
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.
|
@@ -60,10 +60,7 @@ async function initGraphQLServer({
|
|
|
60
60
|
process.env.NODE_ENV === "production" ? (0, import_default.ApolloServerPluginLandingPageProductionDefault)() : (0, import_default.ApolloServerPluginLandingPageLocalDefault)(),
|
|
61
61
|
{
|
|
62
62
|
async requestDidStart({ request, contextValue }) {
|
|
63
|
-
if (
|
|
64
|
-
// eslint-disable-next-line
|
|
65
|
-
contextValue.onlyQuery && !request.query?.startsWith("query")
|
|
66
|
-
)
|
|
63
|
+
if (contextValue.onlyQuery && !request.query?.startsWith("query"))
|
|
67
64
|
contextValue.userId = null;
|
|
68
65
|
}
|
|
69
66
|
},
|
|
@@ -38,10 +38,7 @@ async function initGraphQLServer({
|
|
|
38
38
|
process.env.NODE_ENV === "production" ? ApolloServerPluginLandingPageProductionDefault() : ApolloServerPluginLandingPageLocalDefault(),
|
|
39
39
|
{
|
|
40
40
|
async requestDidStart({ request, contextValue }) {
|
|
41
|
-
if (
|
|
42
|
-
// eslint-disable-next-line
|
|
43
|
-
contextValue.onlyQuery && !request.query?.startsWith("query")
|
|
44
|
-
)
|
|
41
|
+
if (contextValue.onlyQuery && !request.query?.startsWith("query"))
|
|
45
42
|
contextValue.userId = null;
|
|
46
43
|
}
|
|
47
44
|
},
|
package/dist/graphql/init.cjs.js
CHANGED
|
@@ -46,10 +46,7 @@ async function initGraphQLServer({
|
|
|
46
46
|
process.env.NODE_ENV === "production" ? (0, import_default.ApolloServerPluginLandingPageProductionDefault)() : (0, import_default.ApolloServerPluginLandingPageLocalDefault)(),
|
|
47
47
|
{
|
|
48
48
|
async requestDidStart({ request, contextValue }) {
|
|
49
|
-
if (
|
|
50
|
-
// eslint-disable-next-line
|
|
51
|
-
contextValue.onlyQuery && !request.query?.startsWith("query")
|
|
52
|
-
)
|
|
49
|
+
if (contextValue.onlyQuery && !request.query?.startsWith("query"))
|
|
53
50
|
contextValue.userId = null;
|
|
54
51
|
}
|
|
55
52
|
},
|
package/dist/graphql/init.esm.js
CHANGED
|
@@ -27,10 +27,7 @@ async function initGraphQLServer({
|
|
|
27
27
|
process.env.NODE_ENV === "production" ? ApolloServerPluginLandingPageProductionDefault() : ApolloServerPluginLandingPageLocalDefault(),
|
|
28
28
|
{
|
|
29
29
|
async requestDidStart({ request, contextValue }) {
|
|
30
|
-
if (
|
|
31
|
-
// eslint-disable-next-line
|
|
32
|
-
contextValue.onlyQuery && !request.query?.startsWith("query")
|
|
33
|
-
)
|
|
30
|
+
if (contextValue.onlyQuery && !request.query?.startsWith("query"))
|
|
34
31
|
contextValue.userId = null;
|
|
35
32
|
}
|
|
36
33
|
},
|
package/dist/graphql/utils.d.mts
CHANGED
|
@@ -9,14 +9,14 @@ type DeepPartial<T> = {
|
|
|
9
9
|
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
10
10
|
};
|
|
11
11
|
interface BaseDefinition<T extends Values, U extends Values> {
|
|
12
|
-
output: T extends object ? ClassType<
|
|
12
|
+
output: T extends object ? ClassType<DeepPartial<T>> | [ClassType<DeepPartial<T>>] : GraphQLScalarType<T, T> | NumberConstructor | StringConstructor | BooleanConstructor;
|
|
13
13
|
outputOptions?: ReturnOptions;
|
|
14
14
|
input?: U extends object ? ClassType<U> | [ClassType<U>] : GraphQLScalarType<U, U> | NumberConstructor | StringConstructor | BooleanConstructor;
|
|
15
15
|
inputOptions?: ArgsOptions;
|
|
16
16
|
authorized?: boolean;
|
|
17
17
|
}
|
|
18
18
|
interface QueryDefinition<T extends Values, U extends Values> extends BaseDefinition<T, U> {
|
|
19
|
-
fn: (ctx: Context, data: U) => Promise<
|
|
19
|
+
fn: (ctx: Context, data: U) => Promise<T | T[]> | T | T[];
|
|
20
20
|
mutation?: boolean;
|
|
21
21
|
}
|
|
22
22
|
interface FieldResolverDefinition<T extends Values, U extends Values, Root> extends BaseDefinition<T, U> {
|
package/dist/graphql/utils.d.ts
CHANGED
|
@@ -9,14 +9,14 @@ type DeepPartial<T> = {
|
|
|
9
9
|
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
10
10
|
};
|
|
11
11
|
interface BaseDefinition<T extends Values, U extends Values> {
|
|
12
|
-
output: T extends object ? ClassType<
|
|
12
|
+
output: T extends object ? ClassType<DeepPartial<T>> | [ClassType<DeepPartial<T>>] : GraphQLScalarType<T, T> | NumberConstructor | StringConstructor | BooleanConstructor;
|
|
13
13
|
outputOptions?: ReturnOptions;
|
|
14
14
|
input?: U extends object ? ClassType<U> | [ClassType<U>] : GraphQLScalarType<U, U> | NumberConstructor | StringConstructor | BooleanConstructor;
|
|
15
15
|
inputOptions?: ArgsOptions;
|
|
16
16
|
authorized?: boolean;
|
|
17
17
|
}
|
|
18
18
|
interface QueryDefinition<T extends Values, U extends Values> extends BaseDefinition<T, U> {
|
|
19
|
-
fn: (ctx: Context, data: U) => Promise<
|
|
19
|
+
fn: (ctx: Context, data: U) => Promise<T | T[]> | T | T[];
|
|
20
20
|
mutation?: boolean;
|
|
21
21
|
}
|
|
22
22
|
interface FieldResolverDefinition<T extends Values, U extends Values, Root> extends BaseDefinition<T, U> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "naystack",
|
|
3
|
-
"version": "1.1.12-beta.
|
|
3
|
+
"version": "1.1.12-beta.19",
|
|
4
4
|
"description": "A stack built with tight Next + Drizzle + GraphQL",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"drizzle-orm": "^0.44.5",
|
|
57
57
|
"googleapis": "^160.0.0",
|
|
58
58
|
"jsonwebtoken": "^9.0.2",
|
|
59
|
-
"next": "^15.
|
|
59
|
+
"next": "^15.4.2-canary.30",
|
|
60
60
|
"reflect-metadata": "^0.2.2",
|
|
61
61
|
"type-graphql": "2.0.0-rc.2",
|
|
62
62
|
"v4": "^0.0.1"
|