directus / v8-archive

Directus Database API — Wraps Custom SQL Databases with a REST/GraphQL API
https://docs.directus.io/api/reference.html
505 stars 204 forks source link

Leverage directus graphql endpoint. #2352

Open jooola opened 4 years ago

jooola commented 4 years ago

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 ?

rijkvanzanten commented 4 years ago

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

loganwishartcraig commented 4 years ago

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

Couple paths we might consider are

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?

rijkvanzanten commented 4 years ago

@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

gevera commented 3 years ago

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