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

Conversation

@rakeshkky
Copy link
Member

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

Related Issue

close #250

Solution and Design

Updated API to create insert permission with insertable columns.
Example on the table article with user role :-

POST /v1/query
{
	"type": "create_insert_permission",
	"args": {
		"table": "article",
		"role": "user",
		"permission": {
		    "check": {},
		    "allow_upsert": true,
		    "set": {"author_id": "x-hasura-user-id"},
		    "columns": ["title", "content"]
		}
	}
}

columns can be string ( only "*") to specify all columns ({ "columns": "*"}).
columns field is optional and defaults to *.

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 required tests.

@rakeshkky rakeshkky added c/console Related to console c/server Related to server labels Oct 29, 2018
@rakeshkky rakeshkky self-assigned this Oct 29, 2018
@rakeshkky rakeshkky requested a review from 0x777 October 29, 2018 12:19
@hasura-bot
Copy link
Contributor

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

0x777
0x777 previously approved these changes Oct 30, 2018
karthikvt26
karthikvt26 previously approved these changes Nov 2, 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.

Console changes LGTM

@hasura-bot
Copy link
Contributor

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

Resolve Conflicts:
	server/src-lib/Hasura/GraphQL/Resolve/Insert.hs
@0x777 0x777 merged commit 9995804 into hasura:master Nov 2, 2018
@hasura-bot
Copy link
Contributor

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

@hasura-bot
Copy link
Contributor

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

hasura-bot pushed a commit that referenced this pull request Aug 1, 2024
<!-- The PR description should answer 2 important questions: -->

### What

Change an error down to an issue / warning to unbreak builds.

<!-- What is this PR trying to accomplish (and why, if it's not
obvious)? -->

<!-- Consider: do we need to add a changelog entry? -->

<!-- Does this PR introduce new validation that might break old builds?
-->

<!-- Consider: do we need to put new checks behind a flag? -->

### How

Introduce `BooleanExpressionIssue`, move error value to it, emit this
instead. Later we'll turn this into an error based on compatibility
date.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: f0903cc04ea1cf328c9bf67a38d76fd670743679
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow specifying a list of columns that can be inserted

5 participants