naystack 1.5.3 → 1.5.6
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/graphql/index.cjs.js +18 -16
- package/dist/graphql/index.esm.js +18 -16
- package/dist/graphql/utils.cjs.js +18 -16
- package/dist/graphql/utils.esm.js +18 -16
- package/package.json +1 -1
|
@@ -733,24 +733,26 @@ var getUserId = async () => {
|
|
|
733
733
|
return refresh ? getUserIdFromRefreshToken(refresh) : null;
|
|
734
734
|
};
|
|
735
735
|
function getAuthCaller(fn) {
|
|
736
|
-
return
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
736
|
+
return (0, import_react.cache)(
|
|
737
|
+
async (data) => {
|
|
738
|
+
const ctx = {
|
|
739
|
+
userId: await getUserId(),
|
|
740
|
+
isRefreshID: true
|
|
741
|
+
};
|
|
742
|
+
return await fn(ctx, data);
|
|
743
|
+
}
|
|
744
|
+
);
|
|
744
745
|
}
|
|
745
746
|
function getCaller(fn) {
|
|
746
|
-
return
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
747
|
+
return (0, import_react.cache)(
|
|
748
|
+
async (data) => {
|
|
749
|
+
const ctx = {
|
|
750
|
+
userId: null,
|
|
751
|
+
isRefreshID: true
|
|
752
|
+
};
|
|
753
|
+
return await fn(ctx, data);
|
|
754
|
+
}
|
|
755
|
+
);
|
|
754
756
|
}
|
|
755
757
|
function getFieldAuthCaller(fn) {
|
|
756
758
|
return (0, import_react.cache)(
|
|
@@ -729,24 +729,26 @@ var getUserId = async () => {
|
|
|
729
729
|
return refresh ? getUserIdFromRefreshToken(refresh) : null;
|
|
730
730
|
};
|
|
731
731
|
function getAuthCaller(fn) {
|
|
732
|
-
return
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
732
|
+
return cache(
|
|
733
|
+
async (data) => {
|
|
734
|
+
const ctx = {
|
|
735
|
+
userId: await getUserId(),
|
|
736
|
+
isRefreshID: true
|
|
737
|
+
};
|
|
738
|
+
return await fn(ctx, data);
|
|
739
|
+
}
|
|
740
|
+
);
|
|
740
741
|
}
|
|
741
742
|
function getCaller(fn) {
|
|
742
|
-
return
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
743
|
+
return cache(
|
|
744
|
+
async (data) => {
|
|
745
|
+
const ctx = {
|
|
746
|
+
userId: null,
|
|
747
|
+
isRefreshID: true
|
|
748
|
+
};
|
|
749
|
+
return await fn(ctx, data);
|
|
750
|
+
}
|
|
751
|
+
);
|
|
750
752
|
}
|
|
751
753
|
function getFieldAuthCaller(fn) {
|
|
752
754
|
return cache(
|
|
@@ -126,24 +126,26 @@ var getUserId = async () => {
|
|
|
126
126
|
return refresh ? getUserIdFromRefreshToken(refresh) : null;
|
|
127
127
|
};
|
|
128
128
|
function getAuthCaller(fn) {
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
return (0, import_react.cache)(
|
|
130
|
+
async (data) => {
|
|
131
|
+
const ctx = {
|
|
132
|
+
userId: await getUserId(),
|
|
133
|
+
isRefreshID: true
|
|
134
|
+
};
|
|
135
|
+
return await fn(ctx, data);
|
|
136
|
+
}
|
|
137
|
+
);
|
|
137
138
|
}
|
|
138
139
|
function getCaller(fn) {
|
|
139
|
-
return
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
140
|
+
return (0, import_react.cache)(
|
|
141
|
+
async (data) => {
|
|
142
|
+
const ctx = {
|
|
143
|
+
userId: null,
|
|
144
|
+
isRefreshID: true
|
|
145
|
+
};
|
|
146
|
+
return await fn(ctx, data);
|
|
147
|
+
}
|
|
148
|
+
);
|
|
147
149
|
}
|
|
148
150
|
function getFieldAuthCaller(fn) {
|
|
149
151
|
return (0, import_react.cache)(
|
|
@@ -111,24 +111,26 @@ var getUserId = async () => {
|
|
|
111
111
|
return refresh ? getUserIdFromRefreshToken(refresh) : null;
|
|
112
112
|
};
|
|
113
113
|
function getAuthCaller(fn) {
|
|
114
|
-
return
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
return cache(
|
|
115
|
+
async (data) => {
|
|
116
|
+
const ctx = {
|
|
117
|
+
userId: await getUserId(),
|
|
118
|
+
isRefreshID: true
|
|
119
|
+
};
|
|
120
|
+
return await fn(ctx, data);
|
|
121
|
+
}
|
|
122
|
+
);
|
|
122
123
|
}
|
|
123
124
|
function getCaller(fn) {
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
125
|
+
return cache(
|
|
126
|
+
async (data) => {
|
|
127
|
+
const ctx = {
|
|
128
|
+
userId: null,
|
|
129
|
+
isRefreshID: true
|
|
130
|
+
};
|
|
131
|
+
return await fn(ctx, data);
|
|
132
|
+
}
|
|
133
|
+
);
|
|
132
134
|
}
|
|
133
135
|
function getFieldAuthCaller(fn) {
|
|
134
136
|
return cache(
|