mantle-framework icon indicating copy to clipboard operation
mantle-framework copied to clipboard

Add GraphQL Support

Open srtfisher opened this issue 3 years ago • 2 comments

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 avatar Oct 25 '21 18:10 srtfisher

@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?

renatonascalves avatar Jun 23 '23 13:06 renatonascalves

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.

mboynes avatar Aug 09 '23 17:08 mboynes