Skip to content

Commit 238025a

Browse files
test: Adds SchemaBuilder connection test
1 parent d5a5761 commit 238025a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Tests/GraphitiTests/SchemaBuilderTests.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class SchemaBuilderTests: XCTestCase {
2929
}.description(
3030
"A large mass, planet or planetoid in the Star Wars Universe, at the time of 0 ABY."
3131
)
32+
}.add {
33+
ConnectionType(Planet.self)
3234
}.add {
3335
Enum(Episode.self) {
3436
Value(.newHope)
@@ -120,5 +122,11 @@ class SchemaBuilderTests: XCTestCase {
120122
],
121123
])
122124
)
125+
126+
XCTAssert(
127+
api.schema.schema.typeMap.contains(where: { key, _ in
128+
key == "PlanetConnection"
129+
})
130+
)
123131
}
124132
}

0 commit comments

Comments
 (0)