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

Option to disable/hide default mutations #170

Closed
ldesgoui opened this issue Oct 18, 2016 · 1 comment
Closed

Option to disable/hide default mutations #170

ldesgoui opened this issue Oct 18, 2016 · 1 comment

Comments

@ldesgoui
Copy link

ldesgoui commented Oct 18, 2016

Hello,

Currently, the grant/RLS system lets you block all mutations, but they still show in the schema through inspection.
An option to disable those CRUD mutations would be welcome in certain use-cases.

As discussed on gitter, it could simply be implemented with an option passed down to https://github.com/calebmer/postgraphql/blob/3e24703584bb4baaa460da589b072408020a8e1c/src/graphql/schema/getMutationGqlType.ts#L31-L38

Thanks

grncdr added a commit to grncdr/postgraphql that referenced this issue Oct 22, 2016
This introduces a new CLI flag & option: --disable-default-mutations

When default mutations are disabled, the only mutation operations available
will be those exposed by user defined functions.
calebmer added a commit that referenced this issue Oct 24, 2016
Add an option to disable default mutations. Closes #170

All credit goes to @grncdr.

This introduces a new CLI flag & option: --disable-default-mutations

When default mutations are disabled, the only mutation operations available
will be those exposed by user defined functions.

* Use options objects all the way down

This seems more consistent with the rest of the codebase

* pass disableDefaultMutations option through BuildToken

* typo

* Update docs on library usage

* Add integration test for disableDefaultMutations

* Commit updated snapshots

* Revert "Commit updated snapshots"

This reverts commit 6db9086.

* add new schema snapshot
@calebmer
Copy link
Collaborator

calebmer commented Oct 24, 2016

Released in v2.2.0, thanks @grncdr 🎉

Belline pushed a commit to Belline/postgraphql that referenced this issue Dec 18, 2017
Add an option to disable default mutations. Closes graphile#170

All credit goes to @grncdr.

This introduces a new CLI flag & option: --disable-default-mutations

When default mutations are disabled, the only mutation operations available
will be those exposed by user defined functions.

* Use options objects all the way down

This seems more consistent with the rest of the codebase

* pass disableDefaultMutations option through BuildToken

* typo

* Update docs on library usage

* Add integration test for disableDefaultMutations

* Commit updated snapshots

* Revert "Commit updated snapshots"

This reverts commit 6db9086.

* add new schema snapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants