Closed rohansharmaa closed 3 years ago
I have a table column that is named in the format COLUMN_NAME, but on creating an operation it gets converted to COLUMNName.
class Query(Type): COLUMN_NAME = Field(COLUMN_NAME) op = Operation(Query) print(op)
The above code prints - query { COLUMNName }
Is there a way to override this behavior? I want to keep using snake_case as I have a collection of tables that are all named in that format.
Not in the code generator, but if you write it manually you can always specify the graphql_name, see https://sgqlc.readthedocs.io/en/latest/sgqlc.types.html#using-field-instances
graphql_name
I have a table column that is named in the format COLUMN_NAME, but on creating an operation it gets converted to COLUMNName.
The above code prints - query { COLUMNName }
Is there a way to override this behavior? I want to keep using snake_case as I have a collection of tables that are all named in that format.