From d797b61b935ddee38e0ed9139cd40279625a4317 Mon Sep 17 00:00:00 2001 From: asmab Date: Sat, 21 Jan 2023 23:42:21 +0100 Subject: [PATCH 1/9] Working on arrays in input objects as required argument. --- .../builder/GraphQLActionBuilderTest.kt | 39 + .../graphql/artificial/buildkite.json | 1003 +++++++++++++++++ 2 files changed, 1042 insertions(+) create mode 100644 core/src/test/resources/graphql/artificial/buildkite.json diff --git a/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt index 1523745930..aa07aa7105 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt @@ -1570,6 +1570,45 @@ class GraphQLActionBuilderTest { val pipelineSchedule = actionCluster["pipelineSchedule"] as GraphQLAction assertEquals(2, pipelineSchedule.parameters.size) assertTrue(pipelineSchedule.parameters[1] is GQReturnParam) + /**/ + + val organizationInvitationCreate = actionCluster["organizationInvitationCreate"] as GraphQLAction + assertEquals(2, organizationInvitationCreate.parameters.size) + assertTrue(organizationInvitationCreate.parameters[0] is GQInputParam) + + assertTrue(organizationInvitationCreate.parameters[0].name == "input") + assertTrue((organizationInvitationCreate.parameters[0].gene.getWrappedGene(ObjectGene::class.java) != null)) + val objOrganizationInvitationCreate = organizationInvitationCreate.parameters[0].gene.getWrappedGene(ObjectGene::class.java) + if ( objOrganizationInvitationCreate != null) { + + assertTrue( objOrganizationInvitationCreate.fields.any { it.getWrappedGene(ArrayGene::class.java)?.name == "emails" }) } + + + } + + @Test + fun buildkite2Test() { + + val actionCluster = mutableMapOf() + val json = GraphQLActionBuilderTest::class.java.getResource("/graphql/artificial/buildkite.json").readText() + + val config = EMConfig() + GraphQLActionBuilder.addActionsFromSchema(json, actionCluster, config.treeDepth) + + assertEquals(1, actionCluster.size) + val organizationInvitationCreate = actionCluster["organizationInvitationCreate"] as GraphQLAction + assertEquals(2, organizationInvitationCreate.parameters.size) + assertTrue(organizationInvitationCreate.parameters[0] is GQInputParam) + + assertTrue(organizationInvitationCreate.parameters[0].name == "input") + assertTrue((organizationInvitationCreate.parameters[0].gene.getWrappedGene(ObjectGene::class.java) != null)) + val objOrganizationInvitationCreate = + organizationInvitationCreate.parameters[0].gene.getWrappedGene(ObjectGene::class.java) + if (objOrganizationInvitationCreate != null) { + + assertTrue(objOrganizationInvitationCreate.fields.any { it.getWrappedGene(ArrayGene::class.java)?.name == "emails" }) + } + } diff --git a/core/src/test/resources/graphql/artificial/buildkite.json b/core/src/test/resources/graphql/artificial/buildkite.json new file mode 100644 index 0000000000..53ae542fca --- /dev/null +++ b/core/src/test/resources/graphql/artificial/buildkite.json @@ -0,0 +1,1003 @@ +{ + "data": { + "__schema": { + "queryType": { + "name": "Query" + }, + "mutationType": { + "name": "Mutation" + }, + "types": [ + { + "kind": "SCALAR", + "name": "Boolean", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Int", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "String", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + + + { + "kind": "OBJECT", + "name": "Mutation", + "fields": [ + { + "name": "organizationInvitationCreate", + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrganizationInvitationCreateInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrganizationInvitationCreatePayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + + { + "kind": "INPUT_OBJECT", + "name": "OrganizationInvitationCreateInput", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "organizationID", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "emails", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "defaultValue": null + }, + { + "name": "role", + "type": { + "kind": "ENUM", + "name": "OrganizationMemberRole", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "sso", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrganizationInvitationSSOInput", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "teams", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrganizationInvitationTeamAssignmentInput", + "ofType": null + } + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + + { + "kind": "OBJECT", + "name": "OrganizationInvitationCreatePayload", + "fields": [ + { + "name": "clientMutationId", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + + + { + "kind": "OBJECT", + "name": "__Directive", + "fields": [ + { + "name": "name", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "locations", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "__DirectiveLocation", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "args", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "onOperation", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Use `locations`." + }, + { + "name": "onFragment", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Use `locations`." + }, + { + "name": "onField", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Use `locations`." + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__DirectiveLocation", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "QUERY", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MUTATION", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIELD", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_DEFINITION", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_SPREAD", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INLINE_FRAGMENT", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SCHEMA", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SCALAR", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OBJECT", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIELD_DEFINITION", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ARGUMENT_DEFINITION", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INTERFACE", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNION", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM_VALUE", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_OBJECT", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_FIELD_DEFINITION", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__EnumValue", + "fields": [ + { + "name": "name", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDeprecated", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deprecationReason", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Field", + "fields": [ + { + "name": "name", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "args", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDeprecated", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deprecationReason", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__InputValue", + "fields": [ + { + "name": "name", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "defaultValue", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Schema", + "fields": [ + { + "name": "types", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "queryType", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mutationType", + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "directives", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Directive", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subscriptionType", + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Type", + "fields": [ + { + "name": "kind", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "__TypeKind", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fields", + "args": [ + { + "name": "includeDeprecated", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Field", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "interfaces", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "possibleTypes", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "enumValues", + "args": [ + { + "name": "includeDeprecated", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__EnumValue", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inputFields", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ofType", + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__TypeKind", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SCALAR", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OBJECT", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INTERFACE", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNION", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_OBJECT", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LIST", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NON_NULL", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + } + ], + "directives": [ + { + "name": "include", + "locations": [ + "FIELD", + "FRAGMENT_SPREAD", + "INLINE_FRAGMENT" + ], + "args": [ + { + "name": "if", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null + } + ] + }, + { + "name": "skip", + "locations": [ + "FIELD", + "FRAGMENT_SPREAD", + "INLINE_FRAGMENT" + ], + "args": [ + { + "name": "if", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null + } + ] + }, + { + "name": "deprecated", + "locations": [ + "FIELD_DEFINITION", + "ENUM_VALUE" + ], + "args": [ + { + "name": "reason", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": "\"No longer supported\"" + } + ] + } + ] + } + } +} \ No newline at end of file From 0ec694b80683605b9f4b21e1e049da1e446ac9e5 Mon Sep 17 00:00:00 2001 From: asmab Date: Mon, 23 Jan 2023 13:10:29 +0100 Subject: [PATCH 2/9] Fixing issue with arrays and scalars in input object. --- .../graphql/builder/GraphQLActionBuilder.kt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt index 1778667dd4..3293c60440 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt @@ -624,20 +624,20 @@ object GraphQLActionBuilder { val fields: MutableList = mutableListOf() val selectionInArgs = state.argsTablesIndexedByName[element.typeName] ?: listOf() for (element in selectionInArgs) { - if (element.kindOfFieldType.lowercase() == GqlConst.SCALAR) { - val copy = element.copy( - fieldType = element.typeName, - KindOfFieldName = element.fieldType, - typeName = element.fieldName - ) - + if (element.KindOfFieldName.lowercase() == GqlConst.LIST) { + val copy = copyTableElement(element, element) val template = getInputGene(state, history, maxTreeDepth, copy) + fields.add(template) } else - if (element.KindOfFieldName.lowercase() == GqlConst.LIST) { - val copy = copyTableElement(element, element) - val template = getInputGene(state, history, maxTreeDepth, copy) + if (element.kindOfFieldType.lowercase() == GqlConst.SCALAR) { + val copy = element.copy( + fieldType = element.typeName, + KindOfFieldName = element.fieldType, + typeName = element.fieldName + ) + val template = getInputGene(state, history, maxTreeDepth, copy) fields.add(template) } else if (element.kindOfFieldType.lowercase() == GqlConst.INPUT_OBJECT) { From 82fcd9f81fe1ad83157e3fad50186659f5eef4bb Mon Sep 17 00:00:00 2001 From: asmab Date: Mon, 23 Jan 2023 13:11:42 +0100 Subject: [PATCH 3/9] Fixing issue with arrays and scalars in input object during the construction of tables. --- .../problem/graphql/builder/StateBuilder.kt | 125 +++++++++++++----- 1 file changed, 94 insertions(+), 31 deletions(-) diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt index d5e8076335..943aefb0d7 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt @@ -977,41 +977,104 @@ object StateBuilder { for (elementIntypes in schemaObj.data.__schema.types) if ((elementInInputParamTable.fieldType == elementIntypes.name) && (elementIntypes.kind == __TypeKind.INPUT_OBJECT)) for (elementInInputFields in elementIntypes.inputFields) { - val kind0 = elementInInputFields.type.kind - val kind1 = elementInInputFields?.type?.ofType?.kind - if (kind0 == __TypeKind.NON_NULL) {//non optional scalar or enum - if (kind1 == __TypeKind.SCALAR || kind1 == __TypeKind.ENUM) { // non optional scalar or enum - if (kind1 == __TypeKind.ENUM) { - val enumElement: MutableList = - collectEnumElementsInTable( - schemaObj, - elementInInputFields.type.ofType.name - ) - - state.tempArgsTables.add( - Table( - typeName = elementIntypes.name, - kindOfFieldType = kind1.toString(), - isKindOfFieldTypeOptional = false, - fieldType = elementInInputFields.type.ofType.name, - fieldName = elementInInputFields.name, - - enumValues = enumElement + /* val kind0 = elementInInputFields.type.kind + val kind1 = elementInInputFields?.type?.ofType?.kind*/ + + val (kind0, kind1, kind2, kind3)= quadKindsInInputs(elementInInputFields) + + + if (kind0 == __TypeKind.NON_NULL) {////non optional list or scalar or enum + if (kind1 == __TypeKind.LIST) {//nn optional list in the top + if (kind2 == __TypeKind.NON_NULL) {//nn optional scalar or enum or inpu->todo + when (kind3) { + __TypeKind.ENUM -> { + val enumElement: MutableList = + collectEnumElementsInTable( + schemaObj, + elementInInputFields.type.ofType.ofType.ofType.name) + state.tempArgsTables.add( + Table( + KindOfFieldName=__TypeKind.LIST.toString(), + isKindOfFieldNameOptional=false, + + typeName = elementIntypes.name, + kindOfFieldType = kind3.toString(), + isKindOfFieldTypeOptional = false, + fieldType = elementInInputFields.type.ofType.ofType.ofType.name, + fieldName = elementInInputFields.name, + enumValues = enumElement + ) + ) + + + } + __TypeKind.SCALAR -> {state.tempArgsTables.add( + Table( + KindOfFieldName=__TypeKind.LIST.toString(), + isKindOfFieldNameOptional=false, + + typeName = elementIntypes.name, + kindOfFieldType = kind3.toString(), + isKindOfFieldTypeOptional = false, + fieldType = elementInInputFields.type.ofType.ofType.ofType.name, + fieldName = elementInInputFields.name + ) + )} + } + + + } + + }else { + if (kind1 == __TypeKind.SCALAR || kind1 == __TypeKind.ENUM) { // non optional scalar or enum + + if (kind1 == __TypeKind.ENUM) { + val enumElement: MutableList = + collectEnumElementsInTable( + schemaObj, + elementInInputFields.type.ofType.name + ) + + state.tempArgsTables.add( + Table( + typeName = elementIntypes.name, + kindOfFieldType = kind1.toString(), + isKindOfFieldTypeOptional = false, + fieldType = elementInInputFields.type.ofType.name, + fieldName = elementInInputFields.name, + + enumValues = enumElement + ) ) - ) - } else - state.tempArgsTables.add( - Table( - typeName = elementIntypes.name, - kindOfFieldType = kind1.toString(), - isKindOfFieldTypeOptional = false, - fieldType = elementInInputFields.type.ofType.name, - fieldName = elementInInputFields.name + } else + state.tempArgsTables.add( + Table( + typeName = elementIntypes.name, + kindOfFieldType = kind1.toString(), + isKindOfFieldTypeOptional = false, + fieldType = elementInInputFields.type.ofType.name, + fieldName = elementInInputFields.name + ) ) - ) + } + } - } else // optional scalar or enum + + } + + + + + + + + + + + + + else // optional scalar or enum if (kind0 == __TypeKind.SCALAR || kind0 == __TypeKind.ENUM) {// optional scalar or enum if (kind0 == __TypeKind.ENUM) { val enumElement: MutableList = From 324c2f3a6a7a2d5d63cbd1f418f26b5b8e8c93ce Mon Sep 17 00:00:00 2001 From: asmab Date: Mon, 23 Jan 2023 14:15:38 +0100 Subject: [PATCH 4/9] Fixing issue with arrays and input objects during the construction of tables. --- .../problem/graphql/builder/StateBuilder.kt | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt index 943aefb0d7..d4418cee2d 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt @@ -1069,12 +1069,46 @@ object StateBuilder { + else + if(kind0 == __TypeKind.LIST){ + + if(kind1 == __TypeKind.NON_NULL){ + if(kind2 == __TypeKind.INPUT_OBJECT){ + state.tempArgsTables.add( + Table( + KindOfFieldName=__TypeKind.LIST.toString(), + isKindOfFieldNameOptional=true, + + typeName = elementIntypes.name, + kindOfFieldType = kind2.toString(), + isKindOfFieldTypeOptional = false, + fieldType = elementInInputFields.type.ofType.ofType.name, + fieldName = elementInInputFields.name, + ) + ) + } + } + }else - else // optional scalar or enum + + + if (kind0 == __TypeKind.INPUT_OBJECT){ + state.tempArgsTables.add( + Table( + typeName = elementIntypes.name, + kindOfFieldType = kind0.toString(), + isKindOfFieldTypeOptional = true, + fieldType = elementInInputFields.type.name, + fieldName = elementInInputFields.name, + ) + ) + }else + + // optional scalar or enum if (kind0 == __TypeKind.SCALAR || kind0 == __TypeKind.ENUM) {// optional scalar or enum if (kind0 == __TypeKind.ENUM) { val enumElement: MutableList = From d18dbb3744a44603cdbfbfffc67d058fe1950998 Mon Sep 17 00:00:00 2001 From: asmab Date: Mon, 23 Jan 2023 14:16:26 +0100 Subject: [PATCH 5/9] Extending unit test. --- .../core/problem/graphql/builder/GraphQLActionBuilderTest.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt index aa07aa7105..d851e705ee 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt @@ -1607,6 +1607,8 @@ class GraphQLActionBuilderTest { if (objOrganizationInvitationCreate != null) { assertTrue(objOrganizationInvitationCreate.fields.any { it.getWrappedGene(ArrayGene::class.java)?.name == "emails" }) + assertTrue(objOrganizationInvitationCreate.fields.any { it.getWrappedGene(ObjectGene::class.java)?.name == "sso" }) + assertTrue(objOrganizationInvitationCreate.fields.any { it.getWrappedGene(ArrayGene::class.java)?.name == "teams" }) } From 2afac301e8acb8bc4be868b68be71920404084de Mon Sep 17 00:00:00 2001 From: asmab Date: Tue, 24 Jan 2023 11:43:12 +0100 Subject: [PATCH 6/9] working on adding more cases in input objects. --- .../core/problem/graphql/builder/StateBuilder.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt index d4418cee2d..22637b4f15 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt @@ -1021,6 +1021,21 @@ object StateBuilder { fieldName = elementInInputFields.name ) )} + +// __TypeKind.INPUT_OBJECT ->{ +// state.tempArgsTables.add( +// Table( +// KindOfFieldName=__TypeKind.LIST.toString(), +// isKindOfFieldNameOptional=false, +// +// typeName = elementIntypes.name, +// kindOfFieldType = kind3.toString(), +// isKindOfFieldTypeOptional = false, +// fieldType = elementInInputFields.type.ofType.ofType.ofType.name, +// fieldName = elementInInputFields.name +// ) +// ) +// } } From a55fd1c526cfa481bdea8654cc45f9fa0a40a8e4 Mon Sep 17 00:00:00 2001 From: asmab Date: Wed, 22 Mar 2023 10:21:35 +0100 Subject: [PATCH 7/9] Working on inputs. --- .../graphql/builder/GraphQLActionBuilder.kt | 25 +++++++++++++++++-- .../problem/graphql/builder/StateBuilder.kt | 10 ++++---- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt index 3293c60440..1717f6b83f 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt @@ -629,7 +629,20 @@ object GraphQLActionBuilder { val template = getInputGene(state, history, maxTreeDepth, copy) fields.add(template) - } else + } + /* if (element.kindOfFieldType.lowercase() == GqlConst.SCALAR) { + val copy = element.copy( + fieldType = element.typeName, + KindOfFieldName = element.fieldType, + typeName = element.fieldName + ) + + val template = getInputGene(state, history, maxTreeDepth, copy) + fields.add(template) + }*/ + + + else if (element.kindOfFieldType.lowercase() == GqlConst.SCALAR) { val copy = element.copy( fieldType = element.typeName, @@ -639,7 +652,15 @@ object GraphQLActionBuilder { val template = getInputGene(state, history, maxTreeDepth, copy) fields.add(template) - } else + } + /*if (element.KindOfFieldName.lowercase() == GqlConst.LIST) { + val copy = copyTableElement(element, element) + val template = getInputGene(state, history, maxTreeDepth, copy) + + fields.add(template) + }*/ + + else if (element.kindOfFieldType.lowercase() == GqlConst.INPUT_OBJECT) { val copy = copyTableElement(element, element) val template = getInputGene(state, history, maxTreeDepth, copy) diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt index 22637b4f15..81826efce1 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt @@ -1085,8 +1085,8 @@ object StateBuilder { else - - if(kind0 == __TypeKind.LIST){ + /* // + if(kind0 == __TypeKind.LIST){//list->nnnull->inputObj->teams case if(kind1 == __TypeKind.NON_NULL){ if(kind2 == __TypeKind.INPUT_OBJECT){ @@ -1105,13 +1105,13 @@ object StateBuilder { } } }else +*/ - - - if (kind0 == __TypeKind.INPUT_OBJECT){ + // + if (kind0 == __TypeKind.INPUT_OBJECT){//inpuObj directly->sso case state.tempArgsTables.add( Table( typeName = elementIntypes.name, From 3dc99c8ba0a9b1a789ebae191e244be00a8061c2 Mon Sep 17 00:00:00 2001 From: asmab Date: Mon, 3 Apr 2023 01:23:56 +0200 Subject: [PATCH 8/9] reorganizing due to kotlin issues. --- .../problem/graphql/builder/StateBuilder.kt | 53 +++++++++++-------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt index 81826efce1..0f15767101 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt @@ -987,8 +987,8 @@ object StateBuilder { if (kind0 == __TypeKind.NON_NULL) {////non optional list or scalar or enum if (kind1 == __TypeKind.LIST) {//nn optional list in the top if (kind2 == __TypeKind.NON_NULL) {//nn optional scalar or enum or inpu->todo - when (kind3) { - __TypeKind.ENUM -> { + + if (kind3==__TypeKind.ENUM){ val enumElement: MutableList = collectEnumElementsInTable( schemaObj, @@ -1008,8 +1008,10 @@ object StateBuilder { ) - } - __TypeKind.SCALAR -> {state.tempArgsTables.add( + }else + + if (kind3==__TypeKind.SCALAR) + {state.tempArgsTables.add( Table( KindOfFieldName=__TypeKind.LIST.toString(), isKindOfFieldNameOptional=false, @@ -1020,23 +1022,32 @@ object StateBuilder { fieldType = elementInInputFields.type.ofType.ofType.ofType.name, fieldName = elementInInputFields.name ) - )} - -// __TypeKind.INPUT_OBJECT ->{ -// state.tempArgsTables.add( -// Table( -// KindOfFieldName=__TypeKind.LIST.toString(), -// isKindOfFieldNameOptional=false, -// -// typeName = elementIntypes.name, -// kindOfFieldType = kind3.toString(), -// isKindOfFieldTypeOptional = false, -// fieldType = elementInInputFields.type.ofType.ofType.ofType.name, -// fieldName = elementInInputFields.name -// ) -// ) -// } - } + )}else + + + if (kind3==__TypeKind.INPUT_OBJECT){ + state.tempArgsTables.add( + Table( + KindOfFieldName=__TypeKind.LIST.toString(), + isKindOfFieldNameOptional=false, + + typeName = elementIntypes.name, + kindOfFieldType = kind3.toString(), + isKindOfFieldTypeOptional = false, + fieldType = elementInInputFields.type.ofType.ofType.ofType.name, + fieldName = elementInInputFields.name + ) + ) + } + + + + + + + + + } From 15b464fceae5017e59fa090724be26ae27abe36a Mon Sep 17 00:00:00 2001 From: asmab Date: Tue, 25 Apr 2023 15:09:00 +0200 Subject: [PATCH 9/9] Code cleaning up+ adding Todo. --- .../graphql/builder/GraphQLActionBuilder.kt | 19 -- .../problem/graphql/builder/StateBuilder.kt | 184 ++++++++---------- .../builder/GraphQLActionBuilderTest.kt | 6 +- ...uildkite.json => buildkite(fragment).json} | 0 4 files changed, 80 insertions(+), 129 deletions(-) rename core/src/test/resources/graphql/artificial/{buildkite.json => buildkite(fragment).json} (100%) diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt index 462a55ad64..8b6c5892ee 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilder.kt @@ -630,18 +630,6 @@ object GraphQLActionBuilder { fields.add(template) } - /* if (element.kindOfFieldType.lowercase() == GqlConst.SCALAR) { - val copy = element.copy( - fieldType = element.typeName, - KindOfFieldName = element.fieldType, - typeName = element.fieldName - ) - - val template = getInputGene(state, history, maxTreeDepth, copy) - fields.add(template) - }*/ - - else if (element.kindOfFieldType.lowercase() == GqlConst.SCALAR) { val copy = element.copy( @@ -653,13 +641,6 @@ object GraphQLActionBuilder { val template = getInputGene(state, history, maxTreeDepth, copy) fields.add(template) } - /*if (element.KindOfFieldName.lowercase() == GqlConst.LIST) { - val copy = copyTableElement(element, element) - val template = getInputGene(state, history, maxTreeDepth, copy) - - fields.add(template) - }*/ - else if (element.kindOfFieldType.lowercase() == GqlConst.INPUT_OBJECT) { val copy = copyTableElement(element, element) diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt index 0f15767101..284ea8f57e 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/builder/StateBuilder.kt @@ -972,6 +972,7 @@ object StateBuilder { Extract tempArgsTables */ private fun extractTempArgsTables(state: TempState, schemaObj: SchemaObj) { + //Todo we need better strategies for arguments extraction for (elementInInputParamTable in state.argsTables) if (elementInInputParamTable.kindOfFieldType == __TypeKind.INPUT_OBJECT.toString()) for (elementIntypes in schemaObj.data.__schema.types) @@ -981,55 +982,36 @@ object StateBuilder { /* val kind0 = elementInInputFields.type.kind val kind1 = elementInInputFields?.type?.ofType?.kind*/ - val (kind0, kind1, kind2, kind3)= quadKindsInInputs(elementInInputFields) + val (kind0, kind1, kind2, kind3) = quadKindsInInputs(elementInInputFields) - - if (kind0 == __TypeKind.NON_NULL) {////non optional list or scalar or enum - if (kind1 == __TypeKind.LIST) {//nn optional list in the top - if (kind2 == __TypeKind.NON_NULL) {//nn optional scalar or enum or inpu->todo - - if (kind3==__TypeKind.ENUM){ - val enumElement: MutableList = - collectEnumElementsInTable( - schemaObj, - elementInInputFields.type.ofType.ofType.ofType.name) - state.tempArgsTables.add( - Table( - KindOfFieldName=__TypeKind.LIST.toString(), - isKindOfFieldNameOptional=false, - - typeName = elementIntypes.name, - kindOfFieldType = kind3.toString(), - isKindOfFieldTypeOptional = false, - fieldType = elementInInputFields.type.ofType.ofType.ofType.name, - fieldName = elementInInputFields.name, - enumValues = enumElement - ) + if (kind0 == __TypeKind.NON_NULL) {////non-optional list or scalar or enum + if (kind1 == __TypeKind.LIST) {//nn-optional list in the top + if (kind2 == __TypeKind.NON_NULL) { + if (kind3 == __TypeKind.ENUM) { + val enumElement: MutableList = + collectEnumElementsInTable( + schemaObj, + elementInInputFields.type.ofType.ofType.ofType.name ) - - - }else - - if (kind3==__TypeKind.SCALAR) - {state.tempArgsTables.add( + state.tempArgsTables.add( Table( - KindOfFieldName=__TypeKind.LIST.toString(), - isKindOfFieldNameOptional=false, + KindOfFieldName = __TypeKind.LIST.toString(), + isKindOfFieldNameOptional = false, typeName = elementIntypes.name, kindOfFieldType = kind3.toString(), isKindOfFieldTypeOptional = false, fieldType = elementInInputFields.type.ofType.ofType.ofType.name, - fieldName = elementInInputFields.name + fieldName = elementInInputFields.name, + enumValues = enumElement ) - )}else - - - if (kind3==__TypeKind.INPUT_OBJECT){ + ) + } else + if (kind3 == __TypeKind.SCALAR) { state.tempArgsTables.add( Table( - KindOfFieldName=__TypeKind.LIST.toString(), - isKindOfFieldNameOptional=false, + KindOfFieldName = __TypeKind.LIST.toString(), + isKindOfFieldNameOptional = false, typeName = elementIntypes.name, kindOfFieldType = kind3.toString(), @@ -1038,30 +1020,31 @@ object StateBuilder { fieldName = elementInInputFields.name ) ) - } - - - - - - - - - - - + } else + //TODO: This portion will generate GC errors, fix me. + if (kind3 == __TypeKind.INPUT_OBJECT) { + state.tempArgsTables.add( + Table( + KindOfFieldName = __TypeKind.LIST.toString(), + isKindOfFieldNameOptional = false, + + typeName = elementIntypes.name, + kindOfFieldType = kind3.toString(), + isKindOfFieldTypeOptional = false, + fieldType = elementInInputFields.type.ofType.ofType.ofType.name, + fieldName = elementInInputFields.name + ) + ) + } } - - }else { - if (kind1 == __TypeKind.SCALAR || kind1 == __TypeKind.ENUM) { // non optional scalar or enum - + } else { + if (kind1 == __TypeKind.SCALAR || kind1 == __TypeKind.ENUM) { // non-optional scalar or enum if (kind1 == __TypeKind.ENUM) { val enumElement: MutableList = collectEnumElementsInTable( schemaObj, elementInInputFields.type.ofType.name ) - state.tempArgsTables.add( Table( typeName = elementIntypes.name, @@ -1086,25 +1069,16 @@ object StateBuilder { } } + } else + //TODO: This portion will generate GC errors, fix me. + if (kind0 == __TypeKind.LIST) { - } - - - - - - - - else - /* // - if(kind0 == __TypeKind.LIST){//list->nnnull->inputObj->teams case - - if(kind1 == __TypeKind.NON_NULL){ - if(kind2 == __TypeKind.INPUT_OBJECT){ + if (kind1 == __TypeKind.NON_NULL) { + if (kind2 == __TypeKind.INPUT_OBJECT) { state.tempArgsTables.add( Table( - KindOfFieldName=__TypeKind.LIST.toString(), - isKindOfFieldNameOptional=true, + KindOfFieldName = __TypeKind.LIST.toString(), + isKindOfFieldNameOptional = true, typeName = elementIntypes.name, kindOfFieldType = kind2.toString(), @@ -1115,30 +1089,9 @@ object StateBuilder { ) } } - }else -*/ - - - - - // - if (kind0 == __TypeKind.INPUT_OBJECT){//inpuObj directly->sso case - state.tempArgsTables.add( - Table( - typeName = elementIntypes.name, - kindOfFieldType = kind0.toString(), - isKindOfFieldTypeOptional = true, - fieldType = elementInInputFields.type.name, - fieldName = elementInInputFields.name, - ) - ) - }else - - // optional scalar or enum - if (kind0 == __TypeKind.SCALAR || kind0 == __TypeKind.ENUM) {// optional scalar or enum - if (kind0 == __TypeKind.ENUM) { - val enumElement: MutableList = - collectEnumElementsInTable(schemaObj, elementInInputFields.type.name) + } else + //TODO: This portion will generate GC errors, fix me. + if (kind0 == __TypeKind.INPUT_OBJECT) { state.tempArgsTables.add( Table( typeName = elementIntypes.name, @@ -1146,21 +1099,38 @@ object StateBuilder { isKindOfFieldTypeOptional = true, fieldType = elementInInputFields.type.name, fieldName = elementInInputFields.name, - - enumValues = enumElement ) ) } else - state.tempArgsTables.add( - Table( - typeName = elementIntypes.name, - kindOfFieldType = kind0.toString(), - isKindOfFieldTypeOptional = true, - fieldType = elementInInputFields.type.name, - fieldName = elementInInputFields.name - ) - ) - } + if (kind0 == __TypeKind.SCALAR || kind0 == __TypeKind.ENUM) {// optional scalar or enum + if (kind0 == __TypeKind.ENUM) { + val enumElement: MutableList = + collectEnumElementsInTable( + schemaObj, + elementInInputFields.type.name + ) + state.tempArgsTables.add( + Table( + typeName = elementIntypes.name, + kindOfFieldType = kind0.toString(), + isKindOfFieldTypeOptional = true, + fieldType = elementInInputFields.type.name, + fieldName = elementInInputFields.name, + + enumValues = enumElement + ) + ) + } else + state.tempArgsTables.add( + Table( + typeName = elementIntypes.name, + kindOfFieldType = kind0.toString(), + isKindOfFieldTypeOptional = true, + fieldType = elementInInputFields.type.name, + fieldName = elementInInputFields.name + ) + ) + } } } diff --git a/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt index 481c2caddd..78725cf982 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/graphql/builder/GraphQLActionBuilderTest.kt @@ -1696,10 +1696,10 @@ class GraphQLActionBuilderTest { } @Test - fun buildkite2Test() { - + fun buildkiteFragmentTest() { + //This fragment is used for the issues with inputs val actionCluster = mutableMapOf() - val json = GraphQLActionBuilderTest::class.java.getResource("/graphql/artificial/buildkite.json").readText() + val json = GraphQLActionBuilderTest::class.java.getResource("/graphql/artificial/buildkite(fragment).json").readText() val config = EMConfig() GraphQLActionBuilder.addActionsFromSchema(json, actionCluster, config.treeDepth) diff --git a/core/src/test/resources/graphql/artificial/buildkite.json b/core/src/test/resources/graphql/artificial/buildkite(fragment).json similarity index 100% rename from core/src/test/resources/graphql/artificial/buildkite.json rename to core/src/test/resources/graphql/artificial/buildkite(fragment).json