graphql-engine/server/tests-py/queries/apollo_federation/root_fields.yaml
paritosh-08 f6067cb977 server/console: add metadata API set_apollo_federation_config
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5294
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: 274d76ff92970ecffa43943125313ba84b07c495
2022-08-04 09:38:02 +00:00

153 lines
3.3 KiB
YAML

- description: Introspection to check query fields and their types
url: /v1/graphql
status: 200
query:
query: |
query {
__schema {
queryType {
fields {
name
type {
name
kind
ofType {
name
kind
ofType {
name
kind
}
}
}
}
}
}
}
response:
data:
__schema:
queryType:
fields:
- name: _entities
type:
name: _Entity
kind: UNION
ofType:
- name: _service
type:
name:
kind: NON_NULL
ofType:
name: _Service
kind: OBJECT
ofType:
- name: user
type:
name:
kind: NON_NULL
ofType:
name:
kind: LIST
ofType:
name:
kind: NON_NULL
- name: user_aggregate
type:
name:
kind: NON_NULL
ofType:
name: user_aggregate
kind: OBJECT
ofType:
- name: user_by_pk
type:
name: user
kind: OBJECT
ofType:
- description: disable apollo federation for user
url: /v1/metadata
status: 200
query:
type: pg_set_apollo_federation_config
args:
table: user
apollo_federation_config: NULL
response:
message: success
- description: Introspection to check query fields and their types
url: /v1/graphql
status: 200
query:
query: |
query {
__schema {
queryType {
fields {
name
type {
name
kind
ofType {
name
kind
ofType {
name
kind
}
}
}
}
}
}
}
response:
data:
__schema:
queryType:
fields:
- name: _service
type:
name:
kind: NON_NULL
ofType:
name: _Service
kind: OBJECT
ofType:
- name: user
type:
name:
kind: NON_NULL
ofType:
name:
kind: LIST
ofType:
name:
kind: NON_NULL
- name: user_aggregate
type:
name:
kind: NON_NULL
ofType:
name: user_aggregate
kind: OBJECT
ofType:
- name: user_by_pk
type:
name: user
kind: OBJECT
ofType:
- description: enable apollo federation for user
url: /v1/metadata
status: 200
query:
type: pg_set_apollo_federation_config
args:
table: user
apollo_federation_config:
enable: v1
response:
message: success