-
-
Notifications
You must be signed in to change notification settings - Fork 126
Description
Describe the bug
When querying the GraphQL API for Interfaces (this problem likely exists for other models), if you query for a field that doesn't exist in the config.xml but does exist in the Object's model and schema and it is a nullable field it throws an Internal Server Error for that object.
To Reproduce
Steps to reproduce the behavior:
Here is the simplest way to recreate the issue based on my environment:
- Have or create at least two Interfaces in the UI, ensure that one is using DHCP and the other is a Static IP (I'm using IPv4 here but IPv6 will also likely work as well)
- Perform this GraphQL Query:
{
queryInterfaces {
id,
descr,
ipaddr,
subnet
}
}
- You'll notice the DHCP interface causes an Internal server error and is
nullin the output but the Static IP interface will return the expected values.
Expected behavior
When you query for a field in an object that is nullable and it doesn't exist on the specific object it should return null for that field instead of throwing the error.
Screenshots or Response
If applicable, add screenshots or response data to help explain your problem.
pfSense Version & Package Version:
- pfSense Version: 2.8.1-RELEASE
- Package Version: v2.6.1
Affected Endpoints:
- URL: /api/v2/graphql/
Additional context
N/A