Skip to content

Commit f62de68

Browse files
test: Adds onField directive to example schema
1 parent 9922b2d commit f62de68

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Tests/GraphQLTests/ValidationTests/ExampleSchema.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,12 +587,24 @@ let ValidationExampleQueryRoot = try! GraphQLObjectType(
587587
]
588588
)
589589

590+
let ValidationFieldDirective = try! GraphQLDirective(
591+
name: "onField",
592+
locations: [.field]
593+
)
594+
590595
let ValidationExampleSchema = try! GraphQLSchema(
591596
query: ValidationExampleQueryRoot,
592597
types: [
593598
ValidationExampleCat,
594599
ValidationExampleDog,
595600
ValidationExampleHuman,
596601
ValidationExampleAlien,
597-
]
602+
],
603+
directives: {
604+
var directives = specifiedDirectives
605+
directives.append(contentsOf: [
606+
ValidationFieldDirective,
607+
])
608+
return directives
609+
}()
598610
)

0 commit comments

Comments
 (0)