This repository was archived by the owner on Dec 25, 2025. It is now read-only.

Description
Describe the bug
Cannot run graphql-codegen with fabrixForm directive
Steps to reproduce
- Write a mutation query that has
fabrixForm directive in it.
const App = () => {
return (
<FabrixComponent
containerClassName={containerClassName}
query={graphql(`
mutation createTodo($input: TodoInput!) {
addTodo(input: $input)
@fabrixForm(
input: [
{ field: "id", config: { hidden: true } }
{ field: "hasDone", config: { hidden: true } }
{
field: "name"
config: { gridCol: 9 }
constraint: { maxLength: 50 }
}
{ field: "priority", config: { gridCol: 3 } }
]
) {
id
}
}
`)}
/>
)
}
- Run
graphql-codegen
- Get errors
npx graphql-codegen
(node:64109) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
✔ Parse Configuration
⚠ Generate outputs
❯ Generate to ./src/graphql/
✔ Load GraphQL schemas
✔ Load GraphQL documents
✖ GraphQL Document Validation failed with 1 errors;
Error 0: Expected value of type "TodoInput", found [{field: "id", config: {hidden: true}}, {field: "hasDone", config: {hidden: true}}, {field: "name", config: {gridCol: 9}, constraint: {maxLength: 50}}, {field: "priority", config: {gridCol: 3}}].
at /Users/izumisy/Devs/fabrix-framework/fabrix/examples/vite-todoapp/src/App.tsx:5:24
Expected behavior
No error should be expected.
For fabrixView, no error is thrown on the contrary.
Environment
N/A
Additional context
N/A