umbraco-community / umbraco-graphql

An implementation of GraphQL for Umbraco 8 using GraphQL for .NET.
MIT License
64 stars 32 forks source link

V8 looking ahead #35

Closed PeteDuncanson closed 5 years ago

PeteDuncanson commented 6 years ago

Should probably give some thought to V8, I don't think its ready yet but there will be a new public build out at the end of the month that we could "play" with. Only issues I think we will have so far is how we get the data (there is no more GetProperty("title") call, its now just .Value("title) instead. Secondly due to variants we will need to allow for cultures I believe. The admin UI for the back office might need to be in a Content App too.

rasmusjp commented 6 years ago

I've been playing around with the current temp8 branch and might have something I can put up in the coming days.

So far I've found the following things that needs to be changed

Dependency Injection Since v8 is built up around dependency injection we should support this too, I've got it mostly working but there's still some things that needs to be sorted out.

Database and migrations PetaPoco has been replace by NPoco so I guess there's some changes here (maybe only namespaces).

The MigrationBase class now only has a single Migrate method https://github.com/umbraco/Umbraco-CMS/blob/6346710b97200130c80536cadf615fd9e019e902/src/Umbraco.Core/Migrations/MigrationBase.cs#L66

and it looks like the MigrationRunner has been replaced by MigrationPlan e.g. https://github.com/umbraco/Umbraco-CMS/blob/0f7f6aad41f347acd5c97e413fd6cc0b6a8c82d9/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs and an Upgrader e.g. https://github.com/umbraco/Umbraco-CMS/blob/0f7f6aad41f347acd5c97e413fd6cc0b6a8c82d9/src/Umbraco.Core/Migrations/Upgrade/UmbracoUpgrader.cs

Cultures Haven't digged into this yet, but enabling culture variations on a field right now makes everything explode, so there's definitely some work to be done here

rasmusjp commented 6 years ago

I've made some progress in the umbraco8 branch

I've got cultures working with the Accept-Language HTTP header, but I'm not sure that's the way to go.

rasmuseeg commented 5 years ago

I think it's the right way. At least it is a known standard way of during it.

jsommr commented 5 years ago

Headers might cause problems if using websockets. Say someone were to implement Subscription support, which ideally uses websockets or server-sent events, then there'd be no support for http headers. Ideally this would be a filter like the way Contentful does it

jsommr commented 5 years ago

Regarding the topic of looking ahead, does anyone know about GraphQL plans in Umbraco Headless? I think it would be pretty cool if the supported queries and responses was a subset of the how GraphQL will look in Headless. Being able to easily switch over to Headless, perhaps gaining subscription and mutation support by using a commercially developed api, would be really nice.

rasmusjp commented 5 years ago

Just pushed a major rewrite of the Umbraco 8 code and I've removed the Accept-Language header, and added a culture argument to each field instead. Right now there's no inheriting though, so the culture needs to be passed to each field.