graphql-engine/server/tests-py/queries/graphql_query/mysql/replace_metadata.yaml
Sibi Prabakaran 0e6e9deac9 mysql: runSql implementation and python tests leveraging it to enhance the metadata test
https://github.com/hasura/graphql-engine-mono/pull/1606

Co-authored-by: Chris Done <11019+chrisdone@users.noreply.github.com>
Co-authored-by: Aniket Deshpande <922486+aniketd@users.noreply.github.com>
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: 2ed37c48c5d1e82e23d691f30a6e870303787388
2021-07-21 10:22:54 +00:00

49 lines
1.1 KiB
YAML

description: Replace schema cache (metadata)
url: /v1/metadata
status: 200
response:
message: success
query:
type: replace_metadata
args:
version: 3
sources:
- name: mysql
kind: mysql
configuration:
host: '127.0.0.1'
port: 3306
user: hasura
password: password
database: hasura
pool_settings: {}
tables:
- table:
name: author
schema: hasura
array_relationships:
- name: articles
using:
foreign_key_constraint_on:
table:
name: article
schema: hasura
column: author_id
- name: co_articles
using:
foreign_key_constraint_on:
table:
name: article
schema: hasura
column: co_author_id
- table:
name: article
schema: hasura
object_relationships:
- name: author
using:
foreign_key_constraint_on: author_id
- name: co_author
using:
foreign_key_constraint_on: co_author_id