Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a hasura-default naming convention for MSSQL / SQL Server #9426

Closed
kevinmichaelchen opened this issue Feb 8, 2023 · 3 comments
Closed
Labels
k/bug Something isn't working t/native-dbs

Comments

@kevinmichaelchen
Copy link

Version Information

Server Version: v2.17.1
CLI Version (for CLI related issue): v2.17.1

Environment

EE — since we're using a HASURA_GRAPHQL_PRO_KEY env var

What is the current behaviour?

We've set a global naming convention to be graphql-default with this env var:

HASURA_GRAPHQL_DEFAULT_NAMING_CONVENTION: graphql-default

However, when we're connecting to a SQLServer / MSSQL database, due to their case sensitivity, we have to use hasura-default in order to override the globally-defined behavior.

The UI currently makes this difficult.

What is the expected behaviour?

Either the UI should default to and only allow hasura-default for MSSQL, or it should be automatically set in metadata.

How to reproduce the issue?

  1. Introduce a new DB connection to a MSSQL instance
  2. Try to set the DB's naming convention.

Screenshots or Screencast

Please provide any traces or logs that could help here.

Any possible solutions/workarounds you're aware of?

Keywords

@kevinmichaelchen kevinmichaelchen added the k/bug Something isn't working label Feb 8, 2023
@deinspanjer
Copy link

How to reproduce the issue?

  1. Set HASURA_GRAPHQL_DEFAULT_NAMING_CONVENTION: graphql-default
  2. Introduce a new DB connection to a MSSQL instance
  3. Attempt to save the connection and get an error that MSSQL doesn't support graphql-default
  4. Get frustrated because there is no way to "fix" this other than unsetting the env var which would mess up prior work.

Any possible solutions/workarounds you're aware of?

It is possible to work around this, but it is a very ugly hack and surfaces a separate bug that should actually be looked into.
Follow steps 1 and 2 from above
3. Purposefully misconfigure the database connection form to indicate it is a Postgres database even though it is actually MSSQL (don't click submit yet!)
4. Scroll down and expand the now visible configuration section for setting the naming convention.
5. Change the naming convention to hasura-default
6. Scroll back up to the top and change the database type back to MSSQL which will cause that configuration section to disappear again (but the setting you applied is still part of the form that will be submitted. yuck but good for us)
7. Now submit the connection which should be accepted.

@manasag
Copy link
Contributor

manasag commented Feb 27, 2023

Hi folks, we are acknowledging this issue and this is currently being fixed.

@paritosh-08
Copy link
Contributor

Closed via 96549b2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k/bug Something isn't working t/native-dbs
Projects
None yet
Development

No branches or pull requests

5 participants