-
Notifications
You must be signed in to change notification settings - Fork 468
Registering a field to a Setting Group no longer works #2381
Copy link
Copy link
Closed
Labels
impact: medMinor performance improvements, fix broad user base issuesMinor performance improvements, fix broad user base issuesregressionBug that causes a regression to a previously working featureBug that causes a regression to a previously working featuretype: bugIssue that causes incorrect or unexpected behaviorIssue that causes incorrect or unexpected behavior
Description
Problem
Given the following snippet:
add_action( 'graphql_register_types', function() {
register_graphql_field( 'GeneralSettings', 'myCustomField', [
'type' => 'String',
'resolve' => function() {
return 'my custom field value';
}
]);
});I should be able to query the following:
{
generalSettings {
myCustomField
}
}and get the following response:
{
"generalSettings": {
"myCustomField": "my custom field value"
}
}This works in v 1.6.12 and prior, but no longer works in v1.7+
For example, in v1.6.12 we can see the myCustomField in the Schema under the GeneralSettings Type:
But, in v1.8.1, we can see this field is missing, even with the code snippet still in place:
Expectation
Using the register_graphql_field function, I should be able to register a field to a GraphQL Type that was registered by the register_setting() API.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
impact: medMinor performance improvements, fix broad user base issuesMinor performance improvements, fix broad user base issuesregressionBug that causes a regression to a previously working featureBug that causes a regression to a previously working featuretype: bugIssue that causes incorrect or unexpected behaviorIssue that causes incorrect or unexpected behavior

