Skip to content

Commit bb4cb0d

Browse files
committed
Add a couple more tests
1 parent cfce25f commit bb4cb0d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/type_construction.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,18 @@ end
247247

248248
@test my_object.my_sub_object.my_scalar_2 == 3.0
249249

250+
# create with global client
251+
global_graphql_client(client)
252+
my_sub_object = GraphQLClient.create_introspected_struct(
253+
"MySubObject",
254+
Dict("my_scalar_2" => 3.0)
255+
)
256+
my_object = GraphQLClient.create_introspected_struct(
257+
"MyObject",
258+
Dict("my_scalar" => "string", "my_sub_object" => my_sub_object)
259+
)
260+
@test my_object.my_sub_object.my_scalar_2 == 3.0
261+
250262
# Only can create for mutable
251263
GraphQLClient.introspect_object(client, "MyObject"; force=true, mutable=false)
252264

0 commit comments

Comments
 (0)