V8-archive: Leverage directus graphql endpoint.

Created on 6 May 2020  路  4Comments  路  Source: directus/v8-archive

Sorry about the blank ticket.

Gatsby works pretty well simply using the graphql plugin.
Directus seems (see latest changes from api-next) to move toward having graphl deeply integrated in the back end.
That being said, I feel we could think a way of settings this up for the future major version of this plugin (when the future api has been released as stable or beta).
This will bring a lot of powerful features (integration with Gatsby image)

What do you think @loganwishartcraig

We also need a confirmation regarding the graphl endpoint being integrated. @rijkvanzanten could you give us some Input ?

gatsby-source

Most helpful comment

IMHO there is no decent CMS that has graphQL subscriptions out of the box, except Hasura (if you count it as one). I believe that an extension for the Node version of Directus that gives this option can really make a difference. I am loving what you did guys with the latest version, keep it up

All 4 comments

That's accurate, v10 will have full graphql support across the board

Sounds awesome! Definitely think it would be cool to see how we can integrate.

Couple paths we might consider are

  • Swapping out the DirectusService with one that utilizes some graphql library like Apollo to implement all the data fetching - keeping the rest of the plugin the same
  • Wrapping the gatsby-source-graphql plugin with config specific to the Directus use-case

I haven't looked extensively at the gatsby-source-graphql plugin so I'm not sure it would fit our requirements.

@rijkvanzanten will any graphql subscriptions be available for use?

@loganwishartcraig I wouldn't rely on it being available across the board. We're considering adding support, but it relies too much on server environment. PHP doesn't have any core support for websockets, and seeing it isn't a constantly running process (by default), it's impossible to offer websockets reliably in every server environment that can host Directus.

You'll have to see subscriptions as an enhancement for people who are able to run an "enhanced" version of Directus from a cli (eg in a vps), as that's the only way to ensure we have the option to use websockets.

I'd rather not alienate shared hosts / one-click LAMP stacks just for websockets

IMHO there is no decent CMS that has graphQL subscriptions out of the box, except Hasura (if you count it as one). I believe that an extension for the Node version of Directus that gives this option can really make a difference. I am loving what you did guys with the latest version, keep it up

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cdwmhcc picture cdwmhcc  路  3Comments

binary-koan picture binary-koan  路  3Comments

cdwmhcc picture cdwmhcc  路  3Comments

jwkellyiii picture jwkellyiii  路  3Comments

metalmarco picture metalmarco  路  3Comments