This snippet removes the “extensions” from the GraphQL response: Before After
Tag Archives:
Showing Post Type labels in public queries
WPGraphQL respects WordPress core access control rights. This means that data that is only available to authenticated users in the WordPress admin is only available to authenticated users making GraphQL requests. Sometimes, you want to expose fields that are restricted by default. Take the Post Type Label field, for example. Querying for the label of …
Continue reading “Showing Post Type labels in public queries”
Changing the Server Debug Flag
The following snippets show how to change the Debug Flag for the GraphQL Server execution. By default, the function callstack trace is not included with errors data unless users are logged in. If you wanted to track this data on the server, for example, even for public requests, and send the data to a logging …