mantle-framework
mantle-framework copied to clipboard
Add GraphQL Support
Add native GraphQL support for https://www.wpgraphql.com/
Acceptance Criteria
- Mantle models are able to fluently register themselves for use with GraphQL with sensible defaults which are able to be overridden.
- Add an ability to register meta keys with GraphQL when registering meta fields.
- Mimic what we're doing for the REST API.
Background
@srtfisher I'm very interested in this issue but it is not clear to me what do you mean by "native support".
Could you outline some of the goals you have in mind? Or features you envision?
Would be cool to offer a trait for models that automatically set the graphql args for register_post_type...
'show_in_graphql' => true,
'graphql_single_name' => '...',
'graphql_plural_name' => '...',
And even more powerful to register_graphql_field()
for any public post meta on the model.