You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hey, I have some trouble with the rename transformation
The situation :
I have a legacy database with some fields start by number. So I got error I do not apply the rename transformation , no problem I am okay with this ! To Reproduce
Steps to reproduce the behavior:
Have a mysql table with two column name start by number and apply this config:
.meshrc.yaml
The server launch without any exception
And i can query like this :
// just display the id
{
getUsers(limit: 1){
id
}
}
//OR
// just display the id and with filter on the new name
{
getUsers(where:{two_way_authentication:"2"}){
id
}
}
But if i try to display the new field with his new name i have execption
{
getUsers(limit: 1){
id
two_way_authentication_token
}
}
//OR
{
getUsers(where:{two_way_authentication:"2"}){
id
two_way_authentication_token
}
}
i got this error:
{
"errors": [
{
"message": "Invalid or unexpected token",
"path": [
"getUsers"
],
"name": "GraphQLError",
"originalError": {
"name": "SyntaxError",
"message": "Invalid or unexpected token",
"stack": [
"SyntaxError: Invalid or unexpected token",
" at new Function (<anonymous>)",
" at Object.compileQuery (/PATH/node_modules/graphql-jit/dist/execution.js:70:56)",
" at /PATH/node_modules/@graphql-mesh/utils/index.cjs.js:375:42",
" at executor (/PATH/node_modules/@graphql-mesh/mysql/index.cjs.js:420:20)",
" at processTicksAndRejections (internal/process/task_queues.js:95:5)",
" at async Promise.all (index 0)"
]
},
"source": {
"locationOffset": {}
},
"stack": [
"SyntaxError: Invalid or unexpected token",
" at new Function (<anonymous>)",
" at Object.compileQuery (/PATH/node_modules/graphql-jit/dist/execution.js:70:56)",
" at /PATH/node_modules/@graphql-mesh/utils/index.cjs.js:375:42",
" at executor (/PATH/node_modules/@graphql-mesh/mysql/index.cjs.js:420:20)",
" at processTicksAndRejections (internal/process/task_queues.js:95:5)",
" at async Promise.all (index 0)"
]
}
],
"data": {
"getUsers": null
}
}
OpenAPI handler got refactor after this, and it nolonger generates invalid GraphQL fields so this should not be the case anymore. I recommend to use the latest version and try again. let us know if the issue still persists.
Describe the bug
Hey, I have some trouble with the rename transformation
The situation :
I have a legacy database with some fields start by number. So I got error I do not apply the rename transformation , no problem I am okay with this !
To Reproduce
Steps to reproduce the behavior:
Have a mysql table with two column name start by number and apply this config:
.meshrc.yaml
The server launch without any exception
And i can query like this :
But if i try to display the new field with his new name i have execption
i got this error:
Environment:
@graphql-mesh/...
:package.json
The text was updated successfully, but these errors were encountered: