Comments (8)
@itwasmattgregg I'm thinking this feature would probably be best explored as an extension plugin for now.
I'm not sure where Widgets are going with Gutenberg, and the current state of Widgets don't lend to proper exposure to an API as there's no registry for fields that can be added to a widget.
Ideal implementation would expose widgets with their fields, not the rendered HTML, because not all clients care about the rendered HTML. Most clients, I would argue, want the data that was input so they, the client, can handle the rendering in HTML, or React Native, or whatever other format their client needs to output.
Because of the lack of a proper registry for all properties of widgets (fields, namely) it's difficult to expose to WPGraphQL in a very meaningful way.
And Gutenberg taking over widgets complicates things further.
from wp-graphql.
A good solution found here https://github.com/benada002/wp-graphql-widgets
from wp-graphql.
I totally agree and that all makes sense. Thanks for the update.
from wp-graphql.
Relevant Slack discussion here: https://wp-graphql.slack.com/archives/C3NM1M291/p1548183242930100
And thread here: https://wp-graphql.slack.com/archives/C3NM1M291/p1548184977978200
from wp-graphql.
Long story short, I think Widgets have a lot more discussion to be had before we can support them in a meaningful way in WPGraphQL.
from wp-graphql.
Any movement on this?
from wp-graphql.
Does this not help with this issue? #485 Sorry I am new to WP Graph QL and WordPress in general but I am currently trying to rebuild my blog in React with WP Graph QL and trying to rebuild side bar widgets.
Is there a clever workaround?
from wp-graphql.
Closing per discussion above: #20 (comment)
If anyone is interested in creating an extension for this, you can probably use PR #485 as inspiration.
from wp-graphql.
Related Issues (20)
- query with language parameter HOT 4
- Upgrade webonyx/graphql-php to 15.x HOT 2
- Unable to Make Menus and Menu Items public HOT 6
- v2.0 Roadmapping
- Missing avatar or icon in GraphQL IDE UI HOT 9
- Introduce actions/filters for the `register_graphql_admin_notice` API
- DX: Can't narrow down interface subtypes on an implementing object with `register_graphql_field()` HOT 2
- Add WordPress new `Site Icon` feature to generalSettings. HOT 2
- WPGraphql fetching duplicated nodes in Gatsby HOT 7
- Interface Recursion Issues HOT 7
- Open SSF Scorecard
- Arguments defined on Interface Fields are not inherited by the fields on the Implementing Object Type HOT 1
- Codegen issue in generating types: Interface field argument ProductWithPricing.price(format:) expected but GroupProduct.price does not provide it. HOT 4
- Node IDs not being tracked by the Query Analyzer when using DataLoader's `load_many()` method HOT 1
- Missing field argument lead to broken Documentation Explorer HOT 2
- Remove development-related files from SVN on release
- CoreTable column alignment returns null HOT 2
- Can't add mutation for urls gallery. HOT 1
- PostFormat is not set when Contribute/Author uses createPost or updatePost mutations
- Settings page fails to load when "Enable GraphiQL IDE" setting is turned "off"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-graphql.