这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@wawhal
Copy link
Contributor

@wawhal wawhal commented Jan 8, 2020

Description

Fixes semicolon inconsistencies in SQL.
Minor refactor to use a single function for all run_sql queries

Affected components

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System
  • Tests
  • Other (list it)

Related Issues

#3543

Solution and Design

Steps to test and verify

Limitations, known bugs & workarounds

Server checklist

Catalog upgrade

Does this PR change Hasura Catalog version?

  • No
  • Yes
    • Updated docs with SQL for downgrading the catalog

Metadata

Does this PR add a new Metadata feature?

  • No
  • Yes
    • Does run_sql auto manages the new metadata through schema diffing?
      • Yes
      • Not required
    • Does run_sql auto manages the definitions of metadata on renaming?
      • Yes
      • Not required
    • Does export_metadata/replace_metadata supports the new metadata added?
      • Yes
      • Not required

GraphQL

  • No new GraphQL schema is generated
  • New GraphQL schema is being generated:
    • New types and typenames are correlated

Breaking changes

  • No Breaking changes

  • There are breaking changes:

    1. Metadata API

      Existing query types:

      • Modify args payload which is not backward compatible
      • Behavioural change of the API
      • Change in response JSON schema
      • Change in error code
    2. GraphQL API

      Schema Generation:

      • Change in any NamedType
      • Change in table field names

      Schema Resolve:-

      • Change in treatment of null value for any input fields
    3. Logging

      • Log JSON schema has changed
      • Log type names have changed

@wawhal wawhal requested a review from rikinsk as a code owner January 8, 2020 09:22
@netlify
Copy link

netlify bot commented Jan 8, 2020

Deploy preview for hasura-docs ready!

Built with commit 9ec7911

https://deploy-preview-3662--hasura-docs.netlify.com

@wawhal
Copy link
Contributor Author

wawhal commented Jan 8, 2020

/heroku deploy

@hasura-bot
Copy link
Contributor

@wawhal you don't have enough permissions to execute this command

@hasura-bot
Copy link
Contributor

Review app for commit e77baaa deployed to Heroku: https://hge-ci-pull-3662.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3662-e77baaa0

};
};

export const getSetTableEnumQUery = (tableDef, isEnum) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QUery -> Query

@@ -1,8 +1,9 @@
export const getRunSqlQuery = (sql, shouldCascade, readOnly) => {
const sqlWithSemicolon = sql[sql.length - 1] !== ';' ? sql + ';' : sql;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can move this to sqlutils as a function terminateSql. You also need to trim the sql first.

@rikinsk rikinsk added the c/console Related to console label Jan 8, 2020
@hasura-bot
Copy link
Contributor

Review app for commit f4c1ec2 deployed to Heroku: https://hge-ci-pull-3662.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3662-f4c1ec29

@rikinsk rikinsk merged commit 02d13ba into hasura:master Jan 10, 2020
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-3662.herokuapp.com is deleted

@hasura-bot
Copy link
Contributor

Review app for commit 9ec7911 deployed to Heroku: https://hge-ci-pull-3662.herokuapp.com
Docker image for server: hasura/graphql-engine:pull3662-9ec79119

polRk pushed a commit to polRk/graphql-engine that referenced this pull request Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/console Related to console

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants