@@ -4025,6 +4025,8 @@ type Query {
40254025 nested2(input: Input2): String
40264026 nested3(input: Input3): String
40274027 nested4(input: Input4): String
4028+ nested5(input: Input5): String
4029+ nested10(input: Input10): String
40284030 }
40294031
40304032 input Input {
@@ -4041,6 +4043,13 @@ type Query {
40414043
40424044 input Input4 {
40434045 list: [String!]!
4046+ }
4047+
4048+ input Input5 {
4049+ list: [[[String]!]!]
4050+ }
4051+ input Input10 {
4052+ list: [[[[[[[[[[String]]]]]]]]]]
40444053 }`
40454054
40464055 t .Run ("[String]" , func (t * testing.T ) {
@@ -4121,6 +4130,50 @@ type Query {
41214130 runWithDefinition (t , definition , `query Q($a: [String!]!) { nested4(input: {list: $a})}` , Values (), Valid )
41224131 })
41234132 })
4133+
4134+ t .Run ("[[[String]!]!]" , func (t * testing.T ) {
4135+ t .Run ("[[[String!]!]!]! -> [[[String]!]!]" , func (t * testing.T ) {
4136+ runWithDefinition (t , definition , `query Q($a: [[[String!]!]!]!) { nested5(input: {list: $a})}` , Values (), Valid )
4137+ })
4138+ t .Run ("[[[String!]!]!] -> [[[String]!]!]" , func (t * testing.T ) {
4139+ runWithDefinition (t , definition , `query Q($a: [[[String!]!]!]) { nested5(input: {list: $a})}` , Values (), Valid )
4140+ })
4141+ t .Run ("[[[String]!]!]! -> [[[String]!]!]" , func (t * testing.T ) {
4142+ runWithDefinition (t , definition , `query Q($a: [[[String]!]!]!) { nested5(input: {list: $a})}` , Values (), Valid )
4143+ })
4144+ t .Run ("[[[String]!]!] -> [[[String]!]!]" , func (t * testing.T ) {
4145+ runWithDefinition (t , definition , `query Q($a: [[[String]!]!]) { nested5(input: {list: $a})}` , Values (), Valid )
4146+ })
4147+
4148+ t .Run ("[[[String]!]]! -> [[[String]!]!]" , func (t * testing.T ) {
4149+ runWithDefinition (t , definition , `query Q($a: [[[String]!]]!) { nested5(input: {list: $a})}` , Values (), Invalid ,
4150+ withValidationErrors (`Variable "$a" of type "[[[String]!]]!" used in position expecting type "[[[String]!]!]"` ))
4151+ })
4152+ t .Run ("[[[String!]!]] -> [[[String]!]!]" , func (t * testing.T ) {
4153+ runWithDefinition (t , definition , `query Q($a: [[[String!]!]]) { nested5(input: {list: $a})}` , Values (), Invalid ,
4154+ withValidationErrors (`Variable "$a" of type "[[[String!]!]]" used in position expecting type "[[[String]!]!]"` ))
4155+ })
4156+ t .Run ("[[[String]]!]! -> [[[String]!]!]" , func (t * testing.T ) {
4157+ runWithDefinition (t , definition , `query Q($a: [[[String]]!]!) { nested5(input: {list: $a})}` , Values (), Invalid ,
4158+ withValidationErrors (`Variable "$a" of type "[[[String]]!]!" used in position expecting type "[[[String]!]!]"` ))
4159+ })
4160+ t .Run ("[[[String]]] -> [[[String]!]!]" , func (t * testing.T ) {
4161+ runWithDefinition (t , definition , `query Q($a: [[[String]]]) { nested5(input: {list: $a})}` , Values (), Invalid ,
4162+ withValidationErrors (`Variable "$a" of type "[[[String]]]" used in position expecting type "[[[String]!]!]"` ))
4163+ })
4164+ })
4165+
4166+ t .Run ("[[[[[[[[[[String]]]]]]]]]]" , func (t * testing.T ) {
4167+ t .Run ("[[[[[[[[[[String]]]]]]]]]] -> [[[[[[[[[[String]]]]]]]]]]" , func (t * testing.T ) {
4168+ runWithDefinition (t , definition , `query Q($a: [[[[[[[[[[String]]]]]]]]]]) { nested10(input: {list: $a})}` , Values (), Valid )
4169+ })
4170+ t .Run ("[[[[[[[[[[String!]]]]]]]]]] -> [[[[[[[[[[String]]]]]]]]]]" , func (t * testing.T ) {
4171+ runWithDefinition (t , definition , `query Q($a: [[[[[[[[[[String!]]]]]]]]]]) { nested10(input: {list: $a})}` , Values (), Valid )
4172+ })
4173+ t .Run ("[[[[[[[[[[String]!]]]]]]]]]! -> [[[[[[[[[[String]]]]]]]]]]" , func (t * testing.T ) {
4174+ runWithDefinition (t , definition , `query Q($a: [[[[[[[[[[String]!]]]]]]]]]!) { nested10(input: {list: $a})}` , Values (), Valid )
4175+ })
4176+ })
41244177 })
41254178 })
41264179 })
0 commit comments