We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 511e8f2 commit 7856ae9Copy full SHA for 7856ae9
pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsGraphQLTestCase.inc
@@ -388,4 +388,17 @@ class APIModelsGraphQLTestCase extends TestCase {
388
},
389
);
390
}
391
+
392
+ /**
393
+ * Ensure we can query for model fields that are conditionally required. Regression test for #778
394
+ */
395
+ public function test_query_conditionally_required_field(): void {
396
+ # Query for interfaces including conditionally required fields and ensure no errors are returned.
397
+ $graphql = new GraphQL(
398
+ query: 'query {queryInterfaces {id ipaddr subnet descr typev4 track6_interface}}',
399
+ client: $this->auth
400
+ );
401
+ $graphql->create();
402
+ $this->assert_is_empty($graphql->result->value['errors'] ?? []);
403
+ }
404
0 commit comments