Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
Fix type rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaitanLyss committed Jun 20, 2024
1 parent 3f6566f commit 833de39
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
28 changes: 17 additions & 11 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ input CreateGraphESInput {
favorite: Boolean = null
geosVersion: String = null
id: String = null
inputProps: [MacroBlockPropInput!] = []
inputProps: [MacroBlockInputPropInput!] = []
inputTypes: [String!] = null
name: String!
outputProps: [OutputPropInput!] = []
Expand Down Expand Up @@ -107,7 +107,7 @@ type GraphESType {
favoriteOf: [String!]!
geosVersion: String
id: String!
inputProps: [MacroBlockProp!]!
inputProps: [MacroBlockInputProp!]!
inputTypes: [String!]!
name: String!
outputProps: [OutputProp!]!
Expand Down Expand Up @@ -169,7 +169,7 @@ type GraphType {
id: UUID!
isPublic: Boolean!
name: String!
props: [MacroBlockProp!]!
props: [MacroBlockInputProp!]!
updatedAt: DateTime!
}

Expand All @@ -182,35 +182,41 @@ type HealthResponse {
"""The `JSON` scalar type represents JSON values as specified by ECMA-404"""
scalar JSON

type MacroBlockProp {
type MacroBlockInputProp {
bearer: MacroBlockPropBearer
default: JSON
isArray: Boolean!
key: String!
label: String!
options: [String!]

"""HTML props"""
props: JSON
type: MacroBlockPropType!
xmlAttr: String
xmlElement: String
}

enum MacroBlockPropBearer {
node
variable
}

input MacroBlockPropInput {
input MacroBlockInputPropInput {
bearer: MacroBlockPropBearer = null
default: JSON
isArray: Boolean!
key: String!
label: String!
options: [String!] = null

"""HTML props"""
props: JSON = null
type: MacroBlockPropType!
xmlAttr: String = null
xmlElement: String = null
}

enum MacroBlockPropBearer {
node
variable
}

enum MacroBlockPropType {
any
boolean
Expand Down Expand Up @@ -352,7 +358,7 @@ input UpdateGraphInput {
favorite: Boolean = null
geosVersion: String = null
id: String!
inputProps: [MacroBlockPropInput!] = []
inputProps: [MacroBlockInputPropInput!] = []
inputTypes: [String!] = null
keepNullKeys: [String!] = []
name: String = null
Expand Down
16 changes: 11 additions & 5 deletions src/lib/modals/UploadGraphModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
UploadGraphModalCreateStore,
GraphFromAuthorAndNameStore,
type UpdateGraphInput,
type MacroBlockPropInput,
type MacroBlockInputPropInput,
type OutputPropInput
} from '$houdini';
Expand All @@ -29,7 +29,7 @@
import Fa from 'svelte-fa';
import { faQuestionCircle } from '@fortawesome/free-regular-svg-icons';
import { fade, fly, scale, slide } from 'svelte/transition';
import type { InputControl, InputControlTypes } from '$rete/control/Control';
import { InputControl, type InputControlTypes } from '$rete/control/Control';
import { socketTypeExport, type ExportedSocketType } from '$rete/plugin/typed-sockets';
const modalStore = getModalStore();
Expand Down Expand Up @@ -130,7 +130,7 @@
const outputTypes: string[] = [];
const inputTypes: string[] = [];
const outputProps: OutputPropInput[] = [];
const inputProps: MacroBlockPropInput[] = [];
const inputProps: MacroBlockInputPropInput[] = [];
for (const nodeData of editorData.nodes) {
const node = editor.getNode(nodeData.id);
const inputVals = await node.fetchInputs();
Expand Down Expand Up @@ -171,10 +171,16 @@
isArray: socket.isArray
};
if (type === 'input') {
const inputProp: MacroBlockPropInput = {
// const inputControl = node.inputs[key]?.control;
// const htmlProps: Record<string, unknown> = {};
// if (inputControl instanceof InputControl) {
// inputControl.
// }
const inputProp: MacroBlockInputPropInput = {
...outputProp,
bearer: 'node',
default: JSON.stringify(node.getData(key, inputVals))
default: JSON.stringify(node.getData(key, inputVals)),
props: JSON.stringify({})
};
inputProps.push(inputProp);
} else {
Expand Down

0 comments on commit 833de39

Please sign in to comment.