mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 20:41:49 +03:00
fb902d4209
* 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
39 lines
828 B
YAML
39 lines
828 B
YAML
- description: Custom GraphQL query using search_posts function
|
|
url: /v1/graphql
|
|
status: 200
|
|
response:
|
|
data:
|
|
search_posts:
|
|
- title: post by hasura
|
|
content: content for post
|
|
query:
|
|
query: |
|
|
query {
|
|
search_posts(
|
|
args: {search: "hasura"}
|
|
) {
|
|
title
|
|
content
|
|
}
|
|
}
|
|
|
|
- description: ...and make sure this didn't somehow end up under the mutation root
|
|
url: /v1/graphql
|
|
status: 200
|
|
response:
|
|
errors:
|
|
- extensions:
|
|
path: $.selectionSet.search_posts
|
|
code: validation-failed
|
|
message: "field \"search_posts\" not found in type: 'mutation_root'"
|
|
query:
|
|
query: |
|
|
mutation {
|
|
search_posts(
|
|
args: {search: "hasura"}
|
|
) {
|
|
title
|
|
content
|
|
}
|
|
}
|