From c1fe78457867a6c7a686312b32ef0c606d10d6e0 Mon Sep 17 00:00:00 2001 From: DimuthuMadushan Date: Tue, 19 Sep 2023 10:29:53 +0530 Subject: [PATCH] Update the local schema to match with remote schema --- .../ballerina/graphql/generator/graphql/SpecReaderTest.java | 5 +++-- graphql-cli/src/test/resources/expectedGenCode/types.bal | 1 + graphql-cli/src/test/resources/specs/schema.graphql | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/graphql-cli/src/test/java/io/ballerina/graphql/generator/graphql/SpecReaderTest.java b/graphql-cli/src/test/java/io/ballerina/graphql/generator/graphql/SpecReaderTest.java index 74253fe5..f2d26b6e 100644 --- a/graphql-cli/src/test/java/io/ballerina/graphql/generator/graphql/SpecReaderTest.java +++ b/graphql-cli/src/test/java/io/ballerina/graphql/generator/graphql/SpecReaderTest.java @@ -67,8 +67,9 @@ public void testGetInputTypeFieldsMap() throws ValidationException, CmdException List generatedInputObjectTypes = SpecReader.getInputObjectTypeNames(schema); List expectedInputTypeFields = Arrays.asList("code StringQueryOperatorInput?", "continent StringQueryOperatorInput?", "code StringQueryOperatorInput?", - "currency StringQueryOperatorInput?", "code StringQueryOperatorInput?", "nin string[]?", - "regex string?", "ne string?", "glob string?", "eq string?", "'in string[]?"); + "currency StringQueryOperatorInput?", "name StringQueryOperatorInput?", + "code StringQueryOperatorInput?", "nin string[]?", "regex string?", "ne string?", "glob string?", + "eq string?", "'in string[]?"); for (String generatedInputObjectType: generatedInputObjectTypes) { Map generatedInputTypeFieldsMap = SpecReader.getInputTypeFieldsMap(schema, generatedInputObjectType); diff --git a/graphql-cli/src/test/resources/expectedGenCode/types.bal b/graphql-cli/src/test/resources/expectedGenCode/types.bal index acae2cf0..dc32a882 100644 --- a/graphql-cli/src/test/resources/expectedGenCode/types.bal +++ b/graphql-cli/src/test/resources/expectedGenCode/types.bal @@ -5,6 +5,7 @@ public type ContinentFilterInput record { public type CountryFilterInput record { StringQueryOperatorInput? continent?; StringQueryOperatorInput? code?; + StringQueryOperatorInput? name?; StringQueryOperatorInput? currency?; }; diff --git a/graphql-cli/src/test/resources/specs/schema.graphql b/graphql-cli/src/test/resources/specs/schema.graphql index 30cf7db3..bae40fda 100644 --- a/graphql-cli/src/test/resources/specs/schema.graphql +++ b/graphql-cli/src/test/resources/specs/schema.graphql @@ -86,6 +86,7 @@ input CountryFilterInput { code: StringQueryOperatorInput continent: StringQueryOperatorInput currency: StringQueryOperatorInput + name: StringQueryOperatorInput } input LanguageFilterInput {