mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
Fix missing descriptions on GraphQL input object types (#409)
Fixes descriptions defined on `ObjectType`s and their fields in metadata not showing up when that type is expressed as an input object type in GraphQL. V3_GIT_ORIGIN_REV_ID: de5cb2d545441fdebdf85fa84c90e9f0a4cbaac7
This commit is contained in:
parent
13d36900f7
commit
5e1d2cf506
@ -116,7 +116,7 @@ fn input_object_type_input_fields(
|
||||
|
||||
let input_field = gql_schema::InputField::new(
|
||||
graphql_field_name.clone(),
|
||||
None, // Description
|
||||
field_definition.description.clone(),
|
||||
types::Annotation::Input(types::InputAnnotation::InputObjectField {
|
||||
field_name: field_name.clone(),
|
||||
field_type: field_definition.field_type.clone(),
|
||||
@ -162,6 +162,11 @@ pub fn input_object_type_schema(
|
||||
input_object_type_input_fields(gds, builder, &object_type_representation.fields)?;
|
||||
|
||||
Ok(gql_schema::TypeInfo::InputObject(
|
||||
gql_schema::InputObject::new(graphql_type_name, None, input_fields, Vec::new()),
|
||||
gql_schema::InputObject::new(
|
||||
graphql_type_name,
|
||||
object_type_representation.description.clone(),
|
||||
input_fields,
|
||||
Vec::new(),
|
||||
),
|
||||
))
|
||||
}
|
||||
|
@ -123,16 +123,16 @@
|
||||
},
|
||||
{
|
||||
"name": "NameFilterOpaqueSurname",
|
||||
"description": null,
|
||||
"description": "Some description for custom input object type",
|
||||
"fields": null,
|
||||
"inputFields": [
|
||||
{
|
||||
"name": "first_name",
|
||||
"description": null
|
||||
"description": "Some description of first name"
|
||||
},
|
||||
{
|
||||
"name": "surname",
|
||||
"description": null
|
||||
"description": "Some description of last name"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -228,13 +228,16 @@
|
||||
"version": "v1",
|
||||
"definition": {
|
||||
"name": "NameFilterOpaqueSurname",
|
||||
"description": "Some description for custom input object type",
|
||||
"fields": [
|
||||
{
|
||||
"name": "first_name",
|
||||
"description": "Some description of first name",
|
||||
"type": "String"
|
||||
},
|
||||
{
|
||||
"name": "surname",
|
||||
"description": "Some description of last name",
|
||||
"type": "Opaque"
|
||||
}
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user