From 8e71722c592b49e69d62af512b87828f45060d58 Mon Sep 17 00:00:00 2001 From: Mohamed Ishad Date: Tue, 29 Oct 2024 09:27:02 +0530 Subject: [PATCH] Fix failing test case --- .../generator/service/generator/ServiceTypesGenerator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphql-code-generator/src/main/java/io/ballerina/graphql/generator/service/generator/ServiceTypesGenerator.java b/graphql-code-generator/src/main/java/io/ballerina/graphql/generator/service/generator/ServiceTypesGenerator.java index d68a22e0..21642481 100644 --- a/graphql-code-generator/src/main/java/io/ballerina/graphql/generator/service/generator/ServiceTypesGenerator.java +++ b/graphql-code-generator/src/main/java/io/ballerina/graphql/generator/service/generator/ServiceTypesGenerator.java @@ -450,7 +450,7 @@ private NodeList generateRecordTypeFieldsForGraphQLInputObjectFields( List inputTypeFields) throws ServiceGenerationException { List fields = new ArrayList<>(); for (GraphQLInputObjectField field : inputTypeFields) { - MetadataNode metadataNode = getMetadataNode(field.getType(), field.getDescription(), + MetadataNode metadataNode = getMetadataNode(getUnwrappedType(field.getType()), field.getDescription(), field.isDeprecated(), field.getDeprecationReason()); if (field.hasSetDefaultValue()) { Object value = field.getInputFieldDefaultValue().getValue(); @@ -472,7 +472,7 @@ private NodeList generateRecordTypeFieldsForGraphQLFieldDefinitions( List fields = new ArrayList<>(); for (GraphQLFieldDefinition field : typeInputFields) { fields.add(createRecordFieldNode( - getMetadataNode(field.getType(), field.getDescription(), field.isDeprecated(), + getMetadataNode(getUnwrappedType(field.getType()), field.getDescription(), field.isDeprecated(), field.getDeprecationReason()), null, generateTypeDescriptor(field.getType()), createIdentifierToken(field.getName()), null, createToken(SyntaxKind.SEMICOLON_TOKEN)));