Fix UI does not refresh after importing a framework
close #39 Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
|||||||
usePreloadedQuery,
|
usePreloadedQuery,
|
||||||
useQueryLoader,
|
useQueryLoader,
|
||||||
useMutation,
|
useMutation,
|
||||||
|
ConnectionHandler,
|
||||||
} from "react-relay";
|
} from "react-relay";
|
||||||
import { Card, CardContent } from "@/components/ui/card";
|
import { Card, CardContent } from "@/components/ui/card";
|
||||||
import { Link, useParams } from "react-router";
|
import { Link, useParams } from "react-router";
|
||||||
@@ -57,9 +58,10 @@ const FrameworkListPageQuery = graphql`
|
|||||||
const FrameworkListPageImportFrameworkMutation = graphql`
|
const FrameworkListPageImportFrameworkMutation = graphql`
|
||||||
mutation FrameworkListPageImportFrameworkMutation(
|
mutation FrameworkListPageImportFrameworkMutation(
|
||||||
$input: ImportFrameworkInput!
|
$input: ImportFrameworkInput!
|
||||||
|
$connections: [ID!]!
|
||||||
) {
|
) {
|
||||||
importFramework(input: $input) {
|
importFramework(input: $input) {
|
||||||
frameworkEdge {
|
frameworkEdge @prependEdge(connections: $connections) {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -151,6 +153,12 @@ function FrameworkListPageContent({
|
|||||||
|
|
||||||
importFramework({
|
importFramework({
|
||||||
variables: {
|
variables: {
|
||||||
|
connections: [
|
||||||
|
ConnectionHandler.getConnectionID(
|
||||||
|
organizationId!,
|
||||||
|
"FrameworkListPage_frameworks"
|
||||||
|
),
|
||||||
|
],
|
||||||
input: {
|
input: {
|
||||||
organizationId: organizationId!,
|
organizationId: organizationId!,
|
||||||
file: null,
|
file: null,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @generated SignedSource<<92f143ac22d00fc2373928c607a105fa>>
|
* @generated SignedSource<<f8b972f4147ecb52da49f44ef9c62df1>>
|
||||||
* @lightSyntaxTransform
|
* @lightSyntaxTransform
|
||||||
* @nogrep
|
* @nogrep
|
||||||
*/
|
*/
|
||||||
@@ -15,6 +15,7 @@ export type ImportFrameworkInput = {
|
|||||||
organizationId: string;
|
organizationId: string;
|
||||||
};
|
};
|
||||||
export type FrameworkListPageImportFrameworkMutation$variables = {
|
export type FrameworkListPageImportFrameworkMutation$variables = {
|
||||||
|
connections: ReadonlyArray<string>;
|
||||||
input: ImportFrameworkInput;
|
input: ImportFrameworkInput;
|
||||||
};
|
};
|
||||||
export type FrameworkListPageImportFrameworkMutation$data = {
|
export type FrameworkListPageImportFrameworkMutation$data = {
|
||||||
@@ -44,36 +45,31 @@ export type FrameworkListPageImportFrameworkMutation = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const node: ConcreteRequest = (function(){
|
const node: ConcreteRequest = (function(){
|
||||||
var v0 = [
|
var v0 = {
|
||||||
{
|
"defaultValue": null,
|
||||||
|
"kind": "LocalArgument",
|
||||||
|
"name": "connections"
|
||||||
|
},
|
||||||
|
v1 = {
|
||||||
"defaultValue": null,
|
"defaultValue": null,
|
||||||
"kind": "LocalArgument",
|
"kind": "LocalArgument",
|
||||||
"name": "input"
|
"name": "input"
|
||||||
|
},
|
||||||
|
v2 = [
|
||||||
|
{
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "input",
|
||||||
|
"variableName": "input"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
v1 = {
|
v3 = {
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"kind": "ScalarField",
|
"kind": "ScalarField",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
},
|
},
|
||||||
v2 = [
|
v4 = {
|
||||||
{
|
|
||||||
"alias": null,
|
|
||||||
"args": [
|
|
||||||
{
|
|
||||||
"kind": "Variable",
|
|
||||||
"name": "input",
|
|
||||||
"variableName": "input"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"concreteType": "ImportFrameworkPayload",
|
|
||||||
"kind": "LinkedField",
|
|
||||||
"name": "importFramework",
|
|
||||||
"plural": false,
|
|
||||||
"selections": [
|
|
||||||
{
|
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
"concreteType": "FrameworkEdge",
|
"concreteType": "FrameworkEdge",
|
||||||
@@ -89,7 +85,7 @@ v2 = [
|
|||||||
"name": "node",
|
"name": "node",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v1/*: any*/),
|
(v3/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -134,7 +130,7 @@ v2 = [
|
|||||||
"name": "node",
|
"name": "node",
|
||||||
"plural": false,
|
"plural": false,
|
||||||
"selections": [
|
"selections": [
|
||||||
(v1/*: any*/),
|
(v3/*: any*/),
|
||||||
{
|
{
|
||||||
"alias": null,
|
"alias": null,
|
||||||
"args": null,
|
"args": null,
|
||||||
@@ -170,27 +166,71 @@ v2 = [
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"storageKey": null
|
"storageKey": null
|
||||||
}
|
};
|
||||||
],
|
|
||||||
"storageKey": null
|
|
||||||
}
|
|
||||||
];
|
|
||||||
return {
|
return {
|
||||||
"fragment": {
|
"fragment": {
|
||||||
"argumentDefinitions": (v0/*: any*/),
|
"argumentDefinitions": [
|
||||||
|
(v0/*: any*/),
|
||||||
|
(v1/*: any*/)
|
||||||
|
],
|
||||||
"kind": "Fragment",
|
"kind": "Fragment",
|
||||||
"metadata": null,
|
"metadata": null,
|
||||||
"name": "FrameworkListPageImportFrameworkMutation",
|
"name": "FrameworkListPageImportFrameworkMutation",
|
||||||
"selections": (v2/*: any*/),
|
"selections": [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": (v2/*: any*/),
|
||||||
|
"concreteType": "ImportFrameworkPayload",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "importFramework",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v4/*: any*/)
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
],
|
||||||
"type": "Mutation",
|
"type": "Mutation",
|
||||||
"abstractKey": null
|
"abstractKey": null
|
||||||
},
|
},
|
||||||
"kind": "Request",
|
"kind": "Request",
|
||||||
"operation": {
|
"operation": {
|
||||||
"argumentDefinitions": (v0/*: any*/),
|
"argumentDefinitions": [
|
||||||
|
(v1/*: any*/),
|
||||||
|
(v0/*: any*/)
|
||||||
|
],
|
||||||
"kind": "Operation",
|
"kind": "Operation",
|
||||||
"name": "FrameworkListPageImportFrameworkMutation",
|
"name": "FrameworkListPageImportFrameworkMutation",
|
||||||
"selections": (v2/*: any*/)
|
"selections": [
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": (v2/*: any*/),
|
||||||
|
"concreteType": "ImportFrameworkPayload",
|
||||||
|
"kind": "LinkedField",
|
||||||
|
"name": "importFramework",
|
||||||
|
"plural": false,
|
||||||
|
"selections": [
|
||||||
|
(v4/*: any*/),
|
||||||
|
{
|
||||||
|
"alias": null,
|
||||||
|
"args": null,
|
||||||
|
"filters": null,
|
||||||
|
"handle": "prependEdge",
|
||||||
|
"key": "",
|
||||||
|
"kind": "LinkedHandle",
|
||||||
|
"name": "frameworkEdge",
|
||||||
|
"handleArgs": [
|
||||||
|
{
|
||||||
|
"kind": "Variable",
|
||||||
|
"name": "connections",
|
||||||
|
"variableName": "connections"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"storageKey": null
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"cacheID": "946e840d5f7bb3a33e7ee1d0e2180bb5",
|
"cacheID": "946e840d5f7bb3a33e7ee1d0e2180bb5",
|
||||||
@@ -203,6 +243,6 @@ return {
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(node as any).hash = "715a97d6fde9a26f202e8281b9211b1f";
|
(node as any).hash = "76c55c89cce3718241b2ee63f026197b";
|
||||||
|
|
||||||
export default node;
|
export default node;
|
||||||
|
|||||||
Reference in New Issue
Block a user