Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
benada002 committed May 20, 2021
2 parents 6041e4f + a677f46 commit 4887497
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# WPGraphQL Widgets (Queries)
*This Plugin is a first attempt. So there might be some bugs.*

This plugin registers for each active widget a new widget type which exposes all settings of the widget (and for some widgets a `rendered` field [more here](#rendered-field)) and implements the `WidgetInterface` which exposes the following fields.
```
WidgetInterface {
Expand Down Expand Up @@ -55,7 +57,7 @@ You can install and activate it just like any other WordPress plugin.
}
```
#### Rendered field
For the `WPNavMenuWidget`, `WPMediaImageWidget`, `WPWidgetRecentPosts`, `WPWidgetCategories`, `WPWidgetPages` and `WPWidgetRecentComments` types there is also `rendered` field which is a connection to their WPGraphQL type. Here is an example which gives you the menu of a menu widget.
For the `WPNavMenuWidget`, `WPMediaImageWidget`, `WPWidgetRecentPosts`, `WPWidgetCategories`, `WPWidgetPages` and `WPWidgetRecentComments` types there is also `rendered` field which is a connection to their WPGraphQL type. Here is an example which would give you the menu of a menu widget.
```graphql
widget(id: "nav_menu-3") {
databaseId
Expand Down

0 comments on commit 4887497

Please sign in to comment.