Open Decipher opened 2 years ago
My general idea WRT to GraphQL for the DruxtClient is to abstract the current DruxtClient, moving the current JSON:API client into a @druxt/client-jsonapi
module, which would allow for a @druxt/client-graphql
module.
I've also been speaking with @backlineint this morning, and he was talking about how he's been working on https://www.npmjs.com/package/@gdwc/drupal-state, and has experimented with Apollo client and transforming GraphQL to JSON:API.
There's also work done by @d34dman, the author of the https://www.npmjs.com/package/drupal-jsonapi-params module (which is a dependency of both Druxt and DrupalState) towards https://github.com/d34dman/drupal-js-sdk.
The main thing is ensuring that the data that comes back is still in JSON:API format, because the DruxtStore (Vuex state management layer) needs to consume it that way.
@jasonrgd could you provide some of the specifics about why you need GraphQL, and potentially provide repository with GraphQL configured in a realworld usecase, Drupal side as well as a demo client connection/nodejs demo of some sort? If you fork https://github.com/druxt/quickstart-druxt-site as your starting point you'll have Drupal and Nuxt already setup.
Here I am this is me ;-)
Is your feature request related to a problem? Please describe. As a user I want to be able to use GraphQL endpoints because [@TODO]
Describe the solution you'd like
@druxt/client-jsonapi
module@druxt/client-graphql
moduleDescribe alternatives you've considered N/A
Additional context
DruxtClient
DruxtStore