Add introspection tests for order by with ModelV1 and ModelV21 (#1276)

<!-- The PR description should answer 2 important questions: -->

### What

Before making the scalar order by expressions changes, adding a few more
introspection tests to the current thing so we can check we don't break
these.

V3_GIT_ORIGIN_REV_ID: d15efd3b98e2c058d77e443e5cc218034f3b3e6d
This commit is contained in:
Daniel Harvey 2024-10-25 12:53:45 +01:00 committed by hasura-bot
parent 8b34768c27
commit ec4de00a8d
5 changed files with 3063 additions and 0 deletions

View File

@ -0,0 +1,83 @@
query {
__schema {
queryType {
name
}
mutationType {
name
}
subscriptionType {
name
}
types {
...FullType
}
directives {
name
description
args {
...InputValue
}
locations
}
}
}
fragment FullType on __Type {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
description
type {
...TypeRef
}
defaultValue
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}

View File

@ -0,0 +1,83 @@
query {
__schema {
queryType {
name
}
mutationType {
name
}
subscriptionType {
name
}
types {
...FullType
}
directives {
name
description
args {
...InputValue
}
locations
}
}
}
fragment FullType on __Type {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
description
type {
...TypeRef
}
defaultValue
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}

View File

@ -240,6 +240,22 @@ fn test_introspect_model_select_many_where_object_boolean_array_relationship_sim
)
}
// Tests for order by
#[test]
fn test_introspect_model_select_many_order_by() -> anyhow::Result<()> {
let test_path_string = "execute/models/select_many/order_by";
let common_metadata_path_string = "execute/common_metadata/postgres_connector_schema.json";
common::test_introspection_expectation(test_path_string, &[common_metadata_path_string])
}
#[test]
fn test_introspect_model_select_many_order_by_with_model_v2() -> anyhow::Result<()> {
let test_path_string = "execute/models/select_many/order_by/with_model_v2";
let common_metadata_path_string = "execute/common_metadata/postgres_connector_schema.json";
common::test_introspection_expectation(test_path_string, &[common_metadata_path_string])
}
// Tests for subscriptions
// Tests subscription schema generation with introspection queries