graphql-engine/server/tests-py/queries/graphql_mutation/functions/smoke_errs.yaml
hasura-bot fb902d4209 Support tracking SQL functions as mutations. Closes #1514 (#34)
* Support tracking SQL functions as mutations. Closes #1514

Co-authored-by: Brandon Simmons <brandon.m.simmons@gmail.com>
Co-authored-by: Brandon Simmons <brandon@hasura.io>
GITHUB_PR_NUMBER: 6160
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6160

* Update docs/graphql/core/api-reference/schema-metadata-api/custom-functions.rst

Co-authored-by: Marion Schleifer <marion@hasura.io>

* Update docs/graphql/core/schema/custom-functions.rst

Co-authored-by: Marion Schleifer <marion@hasura.io>

* Update docs/graphql/core/schema/custom-functions.rst

Co-authored-by: Marion Schleifer <marion@hasura.io>

* Update docs/graphql/core/schema/custom-functions.rst

Co-authored-by: Brandon Simmons <brandon@hasura.io>
Co-authored-by: Brandon Simmons <brandon.m.simmons@gmail.com>
Co-authored-by: Marion Schleifer <marion@hasura.io>
GitOrigin-RevId: 8fd39258641ecace6e3e9930e497b1655ad35080
2020-11-18 18:05:59 +00:00

29 lines
1.0 KiB
YAML

# For now this is an error since this seens very likely user error, but we're
# not committed to this.
- description: non-volatile function as mutation (error, for now)
url: /v1/query
status: 400
response:
internal:
- definition:
schema: public
name: stable_func1
reason: 'in function "stable_func1": the function "stable_func1" cannot be tracked
because the function was requested to be exposed as a mutation, but is not
marked VOLATILE. Maybe the function was given the wrong volatility when it
was defined?'
type: function
path: $.args
error: 'in function "stable_func1": the function "stable_func1" cannot be tracked
because the function was requested to be exposed as a mutation, but is not marked
VOLATILE. Maybe the function was given the wrong volatility when it was defined?'
code: constraint-violation
query:
version: 2
type: track_function
args:
function: stable_func1
configuration:
exposed_as: mutation