GraphQLError: Variable "$orderBy" got invalid value { position: "AscNullsFirst" }; Field "position"

Testing upgrade from 0.3.0 to 0.3.1 we get this error. I have added the field "position" to company/people/opportunities but I am still getting it. I suspect it might be an issue with updating the TypeORM layer but I am not sure if this is the actual issue. Is there a way to add this Field and continue with the current data?
86 Replies
๐Ÿ…น๐Ÿ…ฐ๐Ÿ†ˆ๐Ÿ…ฑ๐Ÿ…ด๐Ÿ…ด
GraphQLError: Variable "$orderBy" got invalid value { position: "AscNullsFirst" }; Field "position" is not defined by type "CompanyOrderByInput".
at createGraphQLError (/app/node_modules/@graphql-tools/executor/node_modules/@graphql-tools/utils/cjs/errors.js:31:12)
at /app/node_modules/@graphql-tools/executor/cjs/execution/values.js:73:52
at coerceInputValueImpl (/app/node_modules/graphql/utilities/coerceInputValue.js:131:9)
at coerceInputValue (/app/node_modules/graphql/utilities/coerceInputValue.js:32:10)
at coerceVariableValues (/app/node_modules/@graphql-tools/executor/cjs/execution/values.js:68:65)
at getVariableValues (/app/node_modules/@graphql-tools/executor/cjs/execution/values.js:19:25)
at buildExecutionContext (/app/node_modules/@graphql-tools/executor/cjs/execution/execute.js:171:69)
at execute (/app/node_modules/@graphql-tools/executor/cjs/execution/execute.js:32:24)
at /app/node_modules/@graphql-tools/executor/cjs/execution/normalizedExecutor.js:15:81
at new ValueOrPromise (/app/node_modules/@graphql-tools/executor/node_modules/value-or-promise/build/main/ValueOrPromise.js:14:21) {
path: undefined,
locations: [ [Object] ],
extensions: { http: [Object] }
}
]
GraphQLError: Variable "$orderBy" got invalid value { position: "AscNullsFirst" }; Field "position" is not defined by type "CompanyOrderByInput".
at createGraphQLError (/app/node_modules/@graphql-tools/executor/node_modules/@graphql-tools/utils/cjs/errors.js:31:12)
at /app/node_modules/@graphql-tools/executor/cjs/execution/values.js:73:52
at coerceInputValueImpl (/app/node_modules/graphql/utilities/coerceInputValue.js:131:9)
at coerceInputValue (/app/node_modules/graphql/utilities/coerceInputValue.js:32:10)
at coerceVariableValues (/app/node_modules/@graphql-tools/executor/cjs/execution/values.js:68:65)
at getVariableValues (/app/node_modules/@graphql-tools/executor/cjs/execution/values.js:19:25)
at buildExecutionContext (/app/node_modules/@graphql-tools/executor/cjs/execution/execute.js:171:69)
at execute (/app/node_modules/@graphql-tools/executor/cjs/execution/execute.js:32:24)
at /app/node_modules/@graphql-tools/executor/cjs/execution/normalizedExecutor.js:15:81
at new ValueOrPromise (/app/node_modules/@graphql-tools/executor/node_modules/value-or-promise/build/main/ValueOrPromise.js:14:21) {
path: undefined,
locations: [ [Object] ],
extensions: { http: [Object] }
}
]
charles
charlesโ€ข7mo ago
Hi @๐Ÿ…น๐Ÿ…ฐ๐Ÿ†ˆ๐Ÿ…ฑ๐Ÿ…ด๐Ÿ…ด, so it's not documented yet as this is super experimental but you can play with workspace:health (to make sure your workspace postgres schema is a healthy state compared to your metadata) and workspace:sync-metadata commands to upgrade it to the latest stages. I'm quite sure this won't fully work but it should help I'm interested into helping your migrate to the new version to see how good/bad the tooling is right now Could you start by giving me the output of npx nx command -- workspace:health -w {YOUR_WORKSPACE_ID} -d ? (it should write some logs into /logs folder
๐Ÿ…น๐Ÿ…ฐ๐Ÿ†ˆ๐Ÿ…ฑ๐Ÿ…ด๐Ÿ…ด
Should there be something after -d?
charles
charlesโ€ข7mo ago
nope the -d is not properly named (it's dry-run but it should actually be something like --verbose)
๐Ÿ…น๐Ÿ…ฐ๐Ÿ†ˆ๐Ÿ…ฑ๐Ÿ…ด๐Ÿ…ด
Cannot find project 'workspace_6zezc5oiagj6yqldcepfgb226' Cannot find project '{workspace_6zezc5oiagj6yqldcepfgb226}'
charles
charlesโ€ข7mo ago
you need to put your workspace.id not your workspace schema name
charles
charlesโ€ข7mo ago
no worries, it's not documented so... ๐Ÿ˜„
๐Ÿ…น๐Ÿ…ฐ๐Ÿ†ˆ๐Ÿ…ฑ๐Ÿ…ด๐Ÿ…ด
Where do I find the id? I've seen it but can't remember where Is it on the invite screen?
charles
charlesโ€ข7mo ago
you'll need to either check it in your database, or in your nework table /graphql responses (you should see some information about the currentWorkspace and its id)
charles
charlesโ€ข7mo ago
No description
๐Ÿ…น๐Ÿ…ฐ๐Ÿ†ˆ๐Ÿ…ฑ๐Ÿ…ด๐Ÿ…ด
Found the id 75f6e77a-ec52-43fd-af2b-5e1ca8319b2e but no metter how I write it I get "Cannot find project" Should the {} be there or was that your way of stating <insert-here> ?
charles
charlesโ€ข7mo ago
was my way of saying insert there
๐Ÿ…น๐Ÿ…ฐ๐Ÿ†ˆ๐Ÿ…ฑ๐Ÿ…ด๐Ÿ…ด
Cannot find project '75f6e77a-ec52-43fd-af2b-5e1ca8319b2e'
charles
charlesโ€ข7mo ago
You need to be in the server folder to execute it ~/dev/twenty/twenty/packages/twenty-server > npx nx command -- workspace:health -w 20202020-1c25-4d02-bf25-6aeccf7ea419 -d [Nest] 58070 - 03/15/2024, 3:38:05 PM LOG [WorkspaceHealthCommand] Workspace is not healthy, found 1 issues [Nest] 58070 - 03/15/2024, 3:38:05 PM LOG [WorkspaceHealthCommand] Issues written to log
Want results from more Discord servers?
Add your server