Graphql-engine: Trailing spaces when adding a new column should be trimmed.

Created on 23 Apr 2020  路  4Comments  路  Source: hasura/graphql-engine

When creating a new table if any one of the columns has an extra space in the column name table creating fails with the following error, but it's difficult for the user to understand what's wrong as the space is not available in the UI:

image

To be precise column_name throws an exception since it has a trailing space but column_name doesn't.

I suggest we should apply trim() on all column names before sending it to the Postgres and the user need not have to worry about anything.

If you agree that this should be fixed, I am willing to raise a PR for this. Please assign it on me.

console quickfix

Most helpful comment

@mubaidr I am working on it.

All 4 comments

@gnyani This makes sense. It would be great if you could add the fix as you suggested. Thanks

@rikinsk I would like to take on this.

Also I think this should be handled on the input components, this will make sure maximum typed input is trimmed. What do you say?

@mubaidr I am working on it.

@rikinsk can you please review #4545 and merge if all is good?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tirumaraiselvan picture tirumaraiselvan  路  3Comments

anisjonischkeit picture anisjonischkeit  路  3Comments

EmrysMyrddin picture EmrysMyrddin  路  3Comments

macalinao picture macalinao  路  3Comments

jjangga0214 picture jjangga0214  路  3Comments