Skip to content

Commit 7cafefb

Browse files
committed
Add a test where validation happens at build time
1 parent 9e4eea9 commit 7cafefb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

spec/graphql/schema/build_from_definition_spec.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,25 @@ def assert_schema_and_compare_output(definition)
129129
}
130130
131131
directive @foo(arg: InputA) on FIELD
132+
directive @bar(arg: InputA) on FIELD_DEFINITION
132133
133134
type Hello {
134-
int: Int
135+
int: Int @bar(arg: { int: 1 })
135136
}
136137
137138
input InputA {
138139
value: InputB
140+
value2: InputC
141+
int: Int
139142
}
140143
141144
input InputB {
142145
value: InputA
143146
}
147+
148+
input InputC {
149+
value: InputB
150+
}
144151
SCHEMA
145152

146153
parsed_schema = GraphQL::Schema.from_definition(schema)

0 commit comments

Comments
 (0)