Change vendor order to use order by name
Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
@@ -52,8 +52,13 @@ const vendorListFragment = graphql`
|
|||||||
last: { type: "Int" }
|
last: { type: "Int" }
|
||||||
before: { type: "CursorKey" }
|
before: { type: "CursorKey" }
|
||||||
) {
|
) {
|
||||||
vendors(first: $first, after: $after, last: $last, before: $before)
|
vendors(
|
||||||
@connection(key: "VendorListPage_vendors") {
|
first: $first
|
||||||
|
after: $after
|
||||||
|
last: $last
|
||||||
|
before: $before
|
||||||
|
orderBy: { direction: ASC, field: NAME }
|
||||||
|
) @connection(key: "VendorListPage_vendors") {
|
||||||
__id
|
__id
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
@@ -503,7 +508,7 @@ export default function VendorListPage() {
|
|||||||
last: before ? ITEMS_PER_PAGE : undefined,
|
last: before ? ITEMS_PER_PAGE : undefined,
|
||||||
before: before || undefined,
|
before: before || undefined,
|
||||||
});
|
});
|
||||||
}, [loadQuery, organizationId, searchParams]);
|
}, [loadQuery, organizationId]);
|
||||||
|
|
||||||
if (!queryRef) {
|
if (!queryRef) {
|
||||||
return <VendorListFallback />;
|
return <VendorListFallback />;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<4061e153ecdb5d4c746bf6e5dd33537a>>
|
* @generated SignedSource<<167c602f1fa3a3720523424c44c8b734>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -60,42 +60,54 @@ v5 = [
|
|||||||
"variableName": "id"
|
"variableName": "id"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
v6 = [
|
v6 = {
|
||||||
{
|
"kind": "Variable",
|
||||||
"kind": "Variable",
|
"name": "after",
|
||||||
"name": "after",
|
"variableName": "after"
|
||||||
"variableName": "after"
|
},
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "Variable",
|
|
||||||
"name": "before",
|
|
||||||
"variableName": "before"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "Variable",
|
|
||||||
"name": "first",
|
|
||||||
"variableName": "first"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "Variable",
|
|
||||||
"name": "last",
|
|
||||||
"variableName": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
v7 = {
|
v7 = {
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "before",
|
||||||
|
"variableName": "before"
|
||||||
|
},
|
||||||
|
v8 = {
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "first",
|
||||||
|
"variableName": "first"
|
||||||
|
},
|
||||||
|
v9 = {
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "last",
|
||||||
|
"variableName": "last"
|
||||||
|
},
|
||||||
|
v10 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "__typename",
|
"name": "__typename",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v8 = {
|
v11 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
};
|
},
|
||||||
|
v12 = [
|
||||||
|
(v6/*: any*/),
|
||||||
|
(v7/*: any*/),
|
||||||
|
(v8/*: any*/),
|
||||||
|
(v9/*: any*/),
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "orderBy",
|
||||||
|
"value": {
|
||||||
|
"direction": "ASC",
|
||||||
|
"field": "NAME"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
"fragment": {
|
"fragment": {
|
||||||
"argumentDefinitions": [
|
"argumentDefinitions": [
|
||||||
@@ -118,7 +130,12 @@ return {
|
|||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
{
|
{
|
||||||
"args": (v6/*: any*/),
|
"args": [
|
||||||
|
(v6/*: any*/),
|
||||||
|
(v7/*: any*/),
|
||||||
|
(v8/*: any*/),
|
||||||
|
(v9/*: any*/)
|
||||||
|
],
|
||||||
"kind": "FragmentSpread",
|
"kind": "FragmentSpread",
|
||||||
"name": "VendorListPage_vendors"
|
"name": "VendorListPage_vendors"
|
||||||
}
|
}
|
||||||
@@ -149,14 +166,14 @@ return {
|
|||||||
"name": "node",
|
"name": "node",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v7/*: any*/),
|
(v10/*: any*/),
|
||||||
(v8/*: any*/),
|
(v11/*: any*/),
|
||||||
{
|
{
|
||||||
"kind": "InlineFragment",
|
"kind": "InlineFragment",
|
||||||
"selections": [
|
"selections": [
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v6/*: any*/),
|
"args": (v12/*: any*/),
|
||||||
"concreteType": "VendorConnection",
|
"concreteType": "VendorConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "vendors",
|
"name": "vendors",
|
||||||
@@ -178,7 +195,7 @@ return {
|
|||||||
"name": "node",
|
"name": "node",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v8/*: any*/),
|
(v11/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -214,7 +231,7 @@ return {
|
|||||||
"name": "riskTier",
|
"name": "riskTier",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v7/*: any*/)
|
(v10/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
@@ -284,8 +301,10 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v6/*: any*/),
|
"args": (v12/*: any*/),
|
||||||
"filters": null,
|
"filters": [
|
||||||
|
"orderBy"
|
||||||
|
],
|
||||||
"handle": "connection",
|
"handle": "connection",
|
||||||
"key": "VendorListPage_vendors",
|
"key": "VendorListPage_vendors",
|
||||||
"kind": "LinkedHandle",
|
"kind": "LinkedHandle",
|
||||||
@@ -301,16 +320,16 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "36b6d950eacaed69ecef277f51ce7b2f",
|
"cacheID": "72074f9c6435d35453cfd0effbbd6add",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "VendorListPagePaginationQuery",
|
"name": "VendorListPagePaginationQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query VendorListPagePaginationQuery(\n $after: CursorKey\n $before: CursorKey\n $first: Int\n $last: Int\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...VendorListPage_vendors_pbnwq\n id\n }\n}\n\nfragment VendorListPage_vendors_pbnwq on Organization {\n vendors(first: $first, after: $after, last: $last, before: $before) {\n edges {\n node {\n id\n name\n description\n createdAt\n updatedAt\n riskTier\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n id\n}\n"
|
"text": "query VendorListPagePaginationQuery(\n $after: CursorKey\n $before: CursorKey\n $first: Int\n $last: Int\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...VendorListPage_vendors_pbnwq\n id\n }\n}\n\nfragment VendorListPage_vendors_pbnwq on Organization {\n vendors(first: $first, after: $after, last: $last, before: $before, orderBy: {direction: ASC, field: NAME}) {\n edges {\n node {\n id\n name\n description\n createdAt\n updatedAt\n riskTier\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n id\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "7b7bdfacd87b8fa297e905e56cc44423";
|
(node as any).hash = "beaab1664bed1fa776659595b1ef3c30";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<5b261d2af4d8fef41cbe574d9b08ef28>>
|
* @generated SignedSource<<3e49ccb0b233e4d7495387ecf23f2316>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -68,35 +68,47 @@ v6 = {
|
|||||||
"name": "id",
|
"name": "id",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v7 = [
|
v7 = {
|
||||||
{
|
"kind": "Variable",
|
||||||
"kind": "Variable",
|
"name": "after",
|
||||||
"name": "after",
|
"variableName": "after"
|
||||||
"variableName": "after"
|
},
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "Variable",
|
|
||||||
"name": "before",
|
|
||||||
"variableName": "before"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "Variable",
|
|
||||||
"name": "first",
|
|
||||||
"variableName": "first"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kind": "Variable",
|
|
||||||
"name": "last",
|
|
||||||
"variableName": "last"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
v8 = {
|
v8 = {
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "before",
|
||||||
|
"variableName": "before"
|
||||||
|
},
|
||||||
|
v9 = {
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "first",
|
||||||
|
"variableName": "first"
|
||||||
|
},
|
||||||
|
v10 = {
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "last",
|
||||||
|
"variableName": "last"
|
||||||
|
},
|
||||||
|
v11 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "__typename",
|
"name": "__typename",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
};
|
},
|
||||||
|
v12 = [
|
||||||
|
(v7/*: any*/),
|
||||||
|
(v8/*: any*/),
|
||||||
|
(v9/*: any*/),
|
||||||
|
(v10/*: any*/),
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "orderBy",
|
||||||
|
"value": {
|
||||||
|
"direction": "ASC",
|
||||||
|
"field": "NAME"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
"fragment": {
|
"fragment": {
|
||||||
"argumentDefinitions": [
|
"argumentDefinitions": [
|
||||||
@@ -120,7 +132,12 @@ return {
|
|||||||
"selections": [
|
"selections": [
|
||||||
(v6/*: any*/),
|
(v6/*: any*/),
|
||||||
{
|
{
|
||||||
"args": (v7/*: any*/),
|
"args": [
|
||||||
|
(v7/*: any*/),
|
||||||
|
(v8/*: any*/),
|
||||||
|
(v9/*: any*/),
|
||||||
|
(v10/*: any*/)
|
||||||
|
],
|
||||||
"kind": "FragmentSpread",
|
"kind": "FragmentSpread",
|
||||||
"name": "VendorListPage_vendors"
|
"name": "VendorListPage_vendors"
|
||||||
}
|
}
|
||||||
@@ -151,14 +168,14 @@ return {
|
|||||||
"name": "node",
|
"name": "node",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v8/*: any*/),
|
(v11/*: any*/),
|
||||||
(v6/*: any*/),
|
(v6/*: any*/),
|
||||||
{
|
{
|
||||||
"kind": "InlineFragment",
|
"kind": "InlineFragment",
|
||||||
"selections": [
|
"selections": [
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v7/*: any*/),
|
"args": (v12/*: any*/),
|
||||||
"concreteType": "VendorConnection",
|
"concreteType": "VendorConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "vendors",
|
"name": "vendors",
|
||||||
@@ -216,7 +233,7 @@ return {
|
|||||||
"name": "riskTier",
|
"name": "riskTier",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
(v8/*: any*/)
|
(v11/*: any*/)
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
@@ -286,8 +303,10 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": (v7/*: any*/),
|
"args": (v12/*: any*/),
|
||||||
"filters": null,
|
"filters": [
|
||||||
|
"orderBy"
|
||||||
|
],
|
||||||
"handle": "connection",
|
"handle": "connection",
|
||||||
"key": "VendorListPage_vendors",
|
"key": "VendorListPage_vendors",
|
||||||
"kind": "LinkedHandle",
|
"kind": "LinkedHandle",
|
||||||
@@ -303,12 +322,12 @@ return {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "c898734b8c7718e6374ac856827fa4f6",
|
"cacheID": "c2e401b2e573156b913d60ade59ea4ff",
|
||||||
"id": null,
|
"id": null,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"name": "VendorListPageQuery",
|
"name": "VendorListPageQuery",
|
||||||
"operationKind": "query",
|
"operationKind": "query",
|
||||||
"text": "query VendorListPageQuery(\n $organizationId: ID!\n $first: Int\n $after: CursorKey\n $last: Int\n $before: CursorKey\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ...VendorListPage_vendors_pbnwq\n }\n}\n\nfragment VendorListPage_vendors_pbnwq on Organization {\n vendors(first: $first, after: $after, last: $last, before: $before) {\n edges {\n node {\n id\n name\n description\n createdAt\n updatedAt\n riskTier\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n id\n}\n"
|
"text": "query VendorListPageQuery(\n $organizationId: ID!\n $first: Int\n $after: CursorKey\n $last: Int\n $before: CursorKey\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ...VendorListPage_vendors_pbnwq\n }\n}\n\nfragment VendorListPage_vendors_pbnwq on Organization {\n vendors(first: $first, after: $after, last: $last, before: $before, orderBy: {direction: ASC, field: NAME}) {\n edges {\n node {\n id\n name\n description\n createdAt\n updatedAt\n riskTier\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n id\n}\n"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<154771eb64f67988863d8cda0ece1d86>>
|
* @generated SignedSource<<07023a3f17c448fc24762c05b3a7ff87>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -109,7 +109,16 @@ return {
|
|||||||
"selections": [
|
"selections": [
|
||||||
{
|
{
|
||||||
"alias": "vendors",
|
"alias": "vendors",
|
||||||
"args": null,
|
"args": [
|
||||||
|
{
|
||||||
|
"kind": "Literal",
|
||||||
|
"name": "orderBy",
|
||||||
|
"value": {
|
||||||
|
"direction": "ASC",
|
||||||
|
"field": "NAME"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
"concreteType": "VendorConnection",
|
"concreteType": "VendorConnection",
|
||||||
"kind": "LinkedField",
|
"kind": "LinkedField",
|
||||||
"name": "__VendorListPage_vendors_connection",
|
"name": "__VendorListPage_vendors_connection",
|
||||||
@@ -239,7 +248,7 @@ return {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": "__VendorListPage_vendors_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"NAME\"})"
|
||||||
},
|
},
|
||||||
(v1/*: any*/)
|
(v1/*: any*/)
|
||||||
],
|
],
|
||||||
@@ -248,6 +257,6 @@ return {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "7b7bdfacd87b8fa297e905e56cc44423";
|
(node as any).hash = "beaab1664bed1fa776659595b1ef3c30";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
Reference in New Issue
Block a user