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

Conversation

@rakeshkky
Copy link
Member

@rakeshkky rakeshkky commented Oct 3, 2018

Description

What component does this PR affect?

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Requires changes from other components? If yes, please mark the components:

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Solution and Design

  • if on_conflict clause results in DO UPDATE .. then use update
    permission filter expression in WHERE clause
  • validate input columns against columns specified in update permission
  • remove action argument in on_conflict input object. update_columns argument is mandatory.
input table_on_conflict {
  constraint: table_constraint!
  update_columns: [table_update_column!]!
}

Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update
  • Community content

Checklist:

  • I have read the contributing guide and my code conforms to the guidelines.
  • This change requires a change in the documentation.
  • I have updated the documentation accordingly.
  • I have added and modified required tests.

-> if `on_conflict` clause results in `DO UPDATE ..` then use update
permission filter in `WHERE` clause
-> validate input columns against columna specified in update permission
Resolve Conflicts:
	server/src-lib/Hasura/RQL/DML/Insert.hs
	server/tests-py/queries/graphql_mutation/insert/permissions/author_user_role_insert_check_perm_success.yaml
	server/tests-py/queries/graphql_mutation/insert/permissions/company_user_role_on_conflict.yaml
@rakeshkky rakeshkky added s/ok-to-merge Status: This pull request can be merged to master c/server Related to server labels Oct 3, 2018
@rakeshkky rakeshkky self-assigned this Oct 3, 2018
@rakeshkky rakeshkky requested a review from 0x777 October 3, 2018 14:02
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-628.herokuapp.com

Resolve Conflicts:
	server/src-lib/Hasura/GraphQL/Resolve.hs
	server/src-lib/Hasura/GraphQL/Resolve/Mutation.hs
	server/src-lib/Hasura/GraphQL/Schema.hs
	server/src-lib/Hasura/RQL/DML/Insert.hs
	server/src-lib/Hasura/SQL/DML.hs
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-628.herokuapp.com

@shahidhk
Copy link
Member

shahidhk commented Nov 6, 2018

@0x777 @rakeshkky What is the status on this PR?

Resolve Conflicts:
	server/src-lib/Hasura/GraphQL/Resolve/Insert.hs
	server/src-lib/Hasura/GraphQL/Schema.hs
	server/src-lib/Hasura/RQL/DDL/Permission.hs
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-628.herokuapp.com

@0x777 0x777 added the c/console Related to console label Nov 20, 2018
@0x777
Copy link
Member

0x777 commented Nov 20, 2018

@karthikvt26 We are removing 'allow upsert queries' from insert permissions. They are automatically determined from update permissions.

Automatically determine upsert permission from update permission
@dsandip
Copy link
Member

dsandip commented Nov 21, 2018

@rakeshkky @0x777 Do we need to make the console changes before this is merged/released? Also, how is the upgrade going to be handled for people who are currently using this config?

@karthikvt26
Copy link
Contributor

@dsandip rishi is taking a look at it. Console tests are failing due to this change.

@rakeshkky
Copy link
Member Author

@rakeshkky @0x777 Do we need to make the console changes before this is merged/released? Also, how is the upgrade going to be handled for people who are currently using this config?

@dsandip Console changes are required. Existing users have to define update permissions on tables to enable upsert.

Explicitly compute `isUpsertable` during schema generation
@0x777 0x777 added this to the v1.0.0-alpha31 milestone Nov 21, 2018
@wawhal wawhal requested a review from karthikvt26 November 21, 2018 13:39
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-628.herokuapp.com

karthikvt26
karthikvt26 previously approved these changes Nov 22, 2018
Copy link
Contributor

@karthikvt26 karthikvt26 left a comment

Choose a reason for hiding this comment

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

Tested console and it looks fine.

@hasura-bot
Copy link
Contributor

Review app for commit 5ba6e6b deployed to Heroku: https://hge-ci-pull-628.herokuapp.com
Docker image for server: hasura/graphql-engine:pull628-5ba6e6b

@0x777 0x777 modified the milestones: v1.0.0-alpha31, v1.0.0-alpha32 Nov 27, 2018
@hasura-bot
Copy link
Contributor

Review app for commit eedf22a deployed to Heroku: https://hge-ci-pull-628.herokuapp.com
Docker image for server: hasura/graphql-engine:pull628-eedf22a

Resolve Conflicts:
	docs/graphql/manual/mutations/upsert.rst
	server/tests-py/queries/graphql_mutation/insert/nested/articles_with_author_author_id_fail.yaml
	server/tests-py/queries/graphql_mutation/insert/nested/author_with_articles_author_id_fail.yaml
@hasura-bot
Copy link
Contributor

Review app for commit c8c9868 deployed to Heroku: https://hge-ci-pull-628.herokuapp.com
Docker image for server: hasura/graphql-engine:pull628-c8c9868

Resolve Conflicts:
	server/src-lib/Hasura/GraphQL/Resolve/Context.hs
	server/src-lib/Hasura/Prelude.hs
@0x777
Copy link
Member

0x777 commented Dec 14, 2018

@rikinsk You'll need to review the docs.

@0x777 0x777 requested a review from rikinsk-zz December 14, 2018 07:25
@hasura-bot
Copy link
Contributor

Review app for commit 4f34a97 deployed to Heroku: https://hge-ci-pull-628.herokuapp.com
Docker image for server: hasura/graphql-engine:pull628-4f34a97

rikinsk-zz
rikinsk-zz previously approved these changes Dec 14, 2018
Copy link

@rikinsk-zz rikinsk-zz left a comment

Choose a reason for hiding this comment

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

Docs approved

@hasura-bot
Copy link
Contributor

Review app for commit 2e72d0b deployed to Heroku: https://hge-ci-pull-628.herokuapp.com
Docker image for server: hasura/graphql-engine:pull628-2e72d0b

0x777
0x777 previously approved these changes Dec 14, 2018
@0x777 0x777 dismissed stale reviews from rikinsk-zz and themself via b911da0 December 14, 2018 14:27
@hasura-bot
Copy link
Contributor

Review app for commit d5f547e deployed to Heroku: https://hge-ci-pull-628.herokuapp.com
Docker image for server: hasura/graphql-engine:pull628-d5f547e

@hasura-bot
Copy link
Contributor

Review app for commit a6c981a deployed to Heroku: https://hge-ci-pull-628.herokuapp.com
Docker image for server: hasura/graphql-engine:pull628-a6c981a

@0x777 0x777 merged commit 3026c49 into hasura:master Dec 15, 2018
@hasura-bot
Copy link
Contributor

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

hasura-bot pushed a commit that referenced this pull request May 29, 2024
<!-- Thank you for submitting this PR! :) -->

## Description

In hasura/v3-engine#599 we added new
`BooleanExpressionType` to OpenDD. It included a number of helpful
newtypes such as `DataConnectorScalarType` that replace uses of raw
string and make intent inside engine code easier to follow. This change
uses that newtype everywhere in `metadata-resolve`.

<!--
  Questions to consider answering:
  1. What user-facing changes are being made?
2. What are issues related to this PR? (Consider adding `(close
#<issue-no>)` to the PR title)
  3. What is the conceptual design behind this PR?
  4. How can this PR be tested/verified?
  5. Does the PR have limitations?
  6. Does the PR introduce breaking changes?
-->

## Changelog

- Add a changelog entry (in the "Changelog entry" section below) if the
changes
  in this PR have any user-facing impact. See
[changelog
guide](https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide).
- If no changelog is required ignore/remove this section and add a
  `no-changelog-required` label to the PR.

### Product

_(Select all products this will be available in)_

- [X] community-edition
- [X] cloud
<!-- product : end : DO NOT REMOVE -->

### Type

<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->

_(Select only one. In case of multiple, choose the most appropriate)_

- [ ] highlight
- [X] enhancement
- [ ] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->

### Changelog entry

<!--
  - Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
  - For Highlights start with a H4 heading (#### <entry title>)
  - Get the changelog entry reviewed by your team
-->

Use `DataConnectorScalarType` string newtype internallly and in OpenDD
types.

<!-- changelog-entry : end : DO NOT REMOVE -->

<!-- changelog : end : DO NOT REMOVE -->

V3_GIT_ORIGIN_REV_ID: b44709f39b30f25908106110f62c72e3d13b4eb6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/console Related to console c/server Related to server s/ok-to-merge Status: This pull request can be merged to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants