@wpnuxt/core 2.2.0 → 2.2.1
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/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { parse, GraphQLError, visit, print } from 'graphql';
|
|
|
8
8
|
import { execSync } from 'node:child_process';
|
|
9
9
|
import { consola } from 'consola';
|
|
10
10
|
|
|
11
|
-
const version = "2.2.
|
|
11
|
+
const version = "2.2.1";
|
|
12
12
|
|
|
13
13
|
function createModuleError(module, message) {
|
|
14
14
|
return new Error(formatErrorMessage(module, message));
|
|
@@ -4,7 +4,7 @@ const defaultGetCachedData = (key, app, ctx) => {
|
|
|
4
4
|
if (app.isHydrating) {
|
|
5
5
|
return app.payload.data[key];
|
|
6
6
|
}
|
|
7
|
-
if (ctx.cause === "refresh:manual" || ctx.cause === "refresh:hook") {
|
|
7
|
+
if (ctx.cause === "refresh:manual" || ctx.cause === "refresh:hook" || ctx.cause === "watch") {
|
|
8
8
|
return void 0;
|
|
9
9
|
}
|
|
10
10
|
return app.static?.data?.[key] ?? app.payload.data[key] ?? app.$graphqlCache?.get(key);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
query Posts($limit: Int = 10) {
|
|
2
|
-
posts(first: $limit) {
|
|
1
|
+
query Posts($limit: Int = 10, $order: OrderEnum = DESC, $orderField: PostObjectsConnectionOrderbyEnum = DATE) {
|
|
2
|
+
posts(first: $limit, where: { orderby: { field: $orderField, order: $order } }) {
|
|
3
3
|
nodes {
|
|
4
4
|
...Post
|
|
5
5
|
}
|
|
@@ -16,15 +16,15 @@ query PostById($id: ID!, $asPreview: Boolean = false) {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
query PostsByCategoryName($categoryName: String!, $limit: Int = 10) {
|
|
20
|
-
posts(first: $limit, where: {categoryName: $categoryName}) {
|
|
19
|
+
query PostsByCategoryName($categoryName: String!, $limit: Int = 10, $order: OrderEnum = DESC, $orderField: PostObjectsConnectionOrderbyEnum = DATE) {
|
|
20
|
+
posts(first: $limit, where: {categoryName: $categoryName, orderby: { field: $orderField, order: $order }}) {
|
|
21
21
|
nodes {
|
|
22
22
|
...Post
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
query PostsByCategoryId($categoryId: Int!, $limit: Int = 10) {
|
|
27
|
-
posts(first: $limit, where: {categoryId: $categoryId}) {
|
|
26
|
+
query PostsByCategoryId($categoryId: Int!, $limit: Int = 10, $order: OrderEnum = DESC, $orderField: PostObjectsConnectionOrderbyEnum = DATE) {
|
|
27
|
+
posts(first: $limit, where: {categoryId: $categoryId, orderby: { field: $orderField, order: $order }}) {
|
|
28
28
|
nodes {
|
|
29
29
|
...Post
|
|
30
30
|
}
|