Releases: nikcio/Nikcio.UHeadless
Version 7.0.1
✨ Highlights
- Umbraco 15 support
This release supports Umbraco v15. There's still some of the third party integration (Url Tracker) that hasn't been tested due to these packages not being ready for v15 yet. Other than that this is feature compatible with version 5.0.0/5.1.0/6.0.0.
📓 Notes
- Culture is now case-sensitive for URLs (Umbraco change). Therefore it's important to send the correct culture case with inContext. This can show as returning
https://site-culture.com/site-culture
(When sending "en-us") instead of the expectedhttps://site-culture.com/
(When sending "en-US") - Member no longer have access to their parent (Removed from Umbraco)
(CI failed on 7.0.0)
Version 7.0.0
✨ Highlights
- Umbraco 15 support
This release supports Umbraco v15. There's still some of the third party integration (Url Tracker) that hasn't been tested due to these packages not being ready for v15 yet. Other than that this is feature compatible with version 5.0.0/5.1.0/6.0.0.
📓 Notes
- Culture is now case-sensitive for URLs (Umbraco change). Therefore it's important to send the correct culture case with inContext. This can show as returning
https://site-culture.com/site-culture
(When sending "en-us") instead of the expectedhttps://site-culture.com/
(When sending "en-US") - Member no longer have access to their parent (Removed from Umbraco)
Version 6.0.0
✨ Highlights
- Umbraco 14 support
This release supports Umbraco v14. There's still some of the third party integration (Url Tracker) that hasn't been tested due to these packages not being ready for v14 yet. Other than that this is feature compatible with version 5.0.0/5.1.0.
Version 5.1.0
📦 Updated dependencies
Microsoft.AspNetCore.Authentication.JwtBearer
-->8.0.11
Microsoft.Extensions.DependencyInjection.Abstractions
-->8.0.2
Microsoft.Extensions.Logging.Abstractions
-->8.0.2
HotChocolate.AspNetCore
-->13.9.14
HotChocolate.AspNetCore.Authorization
-->13.9.14
Version 6.0.0-preview001
✨ Highlights
- Umbraco 14 support
This release is the first to support Umbraco v14. There's still some of the third party integrations (Skybrud redirects and Url Tracker) that hasn't been tested due to these packages not being ready for v14 yet. Other than that this is feature compatible with version 5.0.0.
Version 4.2.2
Bug Fixes
- Fixed clean startup not working with UHeadless installed (db15d87)
- This was an issue when you already had a project setup with UHeadless but needed to install it on a new database for example when onboarding new members to the project.
Version 5.0.0
✨ Highlights
- Simpler project structure
- You now only need to reference the
Nikcio.UHeadless
package to get started as all packages are now merged into one.
- You now only need to reference the
- New defaults for Queries and Models
- The new defaults are now simpler and limited to the most common useable queries and models.
- Authorization by default
- New defaults will include authorization by default which will help ensure you're not exposing too much data.
- Easier to use Typed properties
- This release brings typed or previously 'Named properties' to the forefront and makes them easier to use.
- Typed properties are now available everywhere it makes sense. (See the feature section for more details)
- Cleaner setup with new bootstrapping.
- The new bootstrapping is simpler and more intuitive.
🐎 Get started
Getting started with version 5.0.0
🚀 Features
- Typed properties are now available everywhere it makes sense.
- Use the
TypedPropertes
class for Content items/Media items and Member items - Use the
TypedNestedContentProperties
class for Nested Content items - Use the
TypedBlockListContentProperties
class for Block List items (Content) - Use the
TypedBlockListSettingsProperties
class for Block List items (Settings) - Use the
TypedBlockGridContentProperties
class for Block Grid items (Content) - Use the
TypedBlockGridSettingsProperties
class for Block Grid items (Settings)
- Use the
- New defaults for Queries and Models
- Queries
- Use
ContentAtRootQuery
to get content at the root of your Umbraco site. - Use
ContentByContentTypeQuery
to get content by content type. - Use
ContentByGuidQuery
to get content by guid. - Use
ContentByIdQuery
to get content by id. - Use
ContentByRouteQuery
to get content by route.- Includes built-in support for the Umbraco automatic redirects.
- Use
ContentByTagQuery
to get content by tag. - Use
MediaAtRootQuery
to get media at the root of your Umbraco site. - Use
MediaByContentTypeQuery
to get media by content type. - Use
MediaByGuidQuery
to get media by guid. - Use
MediaByIdQuery
to get media by id. - Use
FindMembersByDisplayNameQuery
to get members by thier display name. - Use
FindMembersByEmailQuery
to get members by email. - Use
FindMembersByRoleQuery
to get members by role. - Use
FindMembersByUsernameQuery
to get members by username. - Use
MemberByEmailQuery
to get a member by email. - Use
MemberByGuidQuery
to get a member by guid. - Use
MemberByIdQuery
to get a member by id. - Use
MemberByUsernameQuery
to get a member by username.
- Use
- Models
ContentItem
is used for Content queries. This has built-in support for redirect information provided byContentByRouteQuery
.MediaItem
is used for Media queries.MemberItem
is used for Member queries.BlockGrid
to support the block grid editor.BlockList
to support the block list editor.ContentPicker
to support the content picker editor and the multi node picker.DateTimePicker
to support the date time picker editor.DefaultProperty
to support editors that doesn't require special modeling. (Used as the fallback)Label
to support the label editor.MediaPicker
to support the media picker editor.MemberPicker
to support the member picker editor. (Now requires Authorization by default to avoid leaking member information. This can be disabled by settingoptions.DisableAuthorization
)MultiUrlPicker
to support the multi url picker editor.NestedContent
to support the nested content editor.RichText
to support the rich text editor and the markdown editor.UnsupportedProperty
to mark properties that are not supported.
- Queries
- Authorization by default
- Authorization is now enabled by default for all queries to have secure by default queries.
- Authorization is now enabled by default for the
MemberPicker
model to avoid leaking member information. - This can be disabled by setting
options.DisableAuthorization
in theUmbracoHeadlessOptions
.
- New bootstrapping
- Bootstrapping is now simpler and more intuitive. (See the getting started guide at the bottom of this release note)
- The new
ContentPicker
model now supports querying the properties of the picked content. - The
IResolverContext
from HotChocolate has now been added to the default commands so it can be used to resolve services and access query arguments likeCulture
,IncludePreivew
,Fallback
andSegment
. ContentByContentTypeQuery
now supportsincludePreview
to fetch preview content. #229- Context data like
Culture
,IncludePreivew
,Fallback
andSegment
are now provided with theinContext
parameter object on content queries. - Instead of the
UsePaging
attribute from HotChocolate a newPaginationresult
model has been added to avoid problems with the way Umbraco handles content data on queries. This means that theUsePaging
attribute is no longer needed and shouldn't be used in custom queries either.
📖 Documentation Updates
- This release brings an overhaul of the documentation bringing you the most helpful information about the package.
🧪 Test improvements
- Content query tests have been rewritten and are now more stable.
- Media query tests have been rewritten and are now more stable.
- Member query tests have been rewritten and are now more stable.
- Code coverage is now over 80%.
🏛️Project stability
- All projects are now merged into one which makes maintenance easier as this also removes a lot of code as the package could be simplified.
- A new Nikcio.UHeadless.LegacyModels project has been added to help with migration from the old schema to the new schema. (This won't be available as a package but will be available for use for people migrating).
- Use this project to get a similar content model to the one found in v4.
📦 Dependencies
HotChocolate.Data
has been removed as it's no longer needed.
💥 Breaking changes.
- This release is a complete overhaul of the project and therefore a lot of things have changed.
- Take a good look in the documentation which has been updated and if not your question can be answered there open a question on GitHub.
Version 5.0.0-preview005
✨ Highlights
- Simpler project structure
- You now only need to reference the
Nikcio.UHeadless
package to get started as all packages are now merged into one.
- You now only need to reference the
- New defaults for Queries and Models
- The new defaults are now simpler and limited to the most common useable queries and models.
- Authorization by default
- New defaults will include authorization by default which will help ensure you're not exposing too much data.
- Easier to use Typed properties
- This release brings typed or previously 'Named properties' to the forefront and makes them easier to use.
- Typed properties are now available everywhere it makes sense. (See the feature section for more details)
- Cleaner setup with new bootstrapping.
- The new bootstrapping is simpler and more intuitive.
🚀 Features
- Typed properties are now available everywhere it makes sense.
- Use the
TypedPropertes
class for Content items/Media items and Member items - Use the
TypedNestedContentProperties
class for Nested Content items - Use the
TypedBlockListContentProperties
class for Block List items (Content) - Use the
TypedBlockListSettingsProperties
class for Block List items (Settings) - Use the
TypedBlockGridContentProperties
class for Block Grid items (Content) - Use the
TypedBlockGridSettingsProperties
class for Block Grid items (Settings)
- Use the
- New defaults for Queries and Models
- Queries
- Use
ContentAtRootQuery
to get content at the root of your Umbraco site. - Use
ContentByContentTypeQuery
to get content by content type. - Use
ContentByGuidQuery
to get content by guid. - Use
ContentByIdQuery
to get content by id. - Use
ContentByRouteQuery
to get content by route.- Includes built-in support for the Umbraco automatic redirects.
- Use
ContentByTagQuery
to get content by tag. - Use
MediaAtRootQuery
to get media at the root of your Umbraco site. - Use
MediaByContentTypeQuery
to get media by content type. - Use
MediaByGuidQuery
to get media by guid. - Use
MediaByIdQuery
to get media by id. - Use
FindMembersByDisplayNameQuery
to get members by thier display name. - Use
FindMembersByEmailQuery
to get members by email. - Use
FindMembersByRoleQuery
to get members by role. - Use
FindMembersByUsernameQuery
to get members by username. - Use
MemberByEmailQuery
to get a member by email. - Use
MemberByGuidQuery
to get a member by guid. - Use
MemberByIdQuery
to get a member by id. - Use
MemberByUsernameQuery
to get a member by username.
- Use
- Models
ContentItem
is used for Content queries. This has built-in support for redirect information provided byContentByRouteQuery
.MediaItem
is used for Media queries.MemberItem
is used for Member queries.BlockGrid
to support the block grid editor.BlockList
to support the block list editor.ContentPicker
to support the content picker editor and the multi node picker.DateTimePicker
to support the date time picker editor.DefaultProperty
to support editors that doesn't require special modeling. (Used as the fallback)Label
to support the label editor.MediaPicker
to support the media picker editor.MemberPicker
to support the member picker editor. (Now requires Authorization by default to avoid leaking member information. This can be disabled by settingoptions.DisableAuthorization
)MultiUrlPicker
to support the multi url picker editor.NestedContent
to support the nested content editor.RichText
to support the rich text editor and the markdown editor.UnsupportedProperty
to mark properties that are not supported.
- Queries
- Authorization by default [Work in progress]
- Authorization is now enabled by default for all queries to have secure by default queries.
- Authorization is now enabled by default for the
MemberPicker
model to avoid leaking member information. - This can be disabled by setting
options.DisableAuthorization
in theUmbracoHeadlessOptions
.
- New bootstrapping
- Bootstrapping is now simpler and more intuitive. (See the getting started guide at the bottom of this release note)
- The new
ContentPicker
model now supports querying the properties of the picked content. - The
IResolverContext
from HotChocolate has now been added to the default commands so it can be used to resolve services and access query arguments likeCulture
,IncludePreivew
,Fallback
andSegment
. ContentByContentTypeQuery
now supportsincludePreview
to fetch preview content. #229- Context data like
Culture
,IncludePreivew
,Fallback
andSegment
are now provided with theinContext
parameter object on content queries. - Instead of the
UsePaging
attribute from HotChocolate a newPaginationresult
model has been added to avoid problems with the way Umbraco handles content data on queries. This means that theUsePaging
attribute is no longer needed and shouldn't be used in custom queries either.
🧪 Test improvements
- Content query tests have been rewritten and are now more stable.
- Media query tests have been rewritten and are now more stable.
🏛️Project stability
- All projects are now merged into one which makes maintenance easier as this also removes a lot of code as the package could be simplified.
- A new Nikcio.UHeadless.LegacyModels project has been added to help with migration from the old schema to the new schema. (This won't be available as a package but will be available for use for people migrating).
📦 Dependencies
HotChocolate.Data
has been removed as it's no longer needed.
💥 Breaking changes.
- This release is a complete overhaul of the project and therefore a lot of things have changed. A migration guide will be written to help with the migration.
🚧 Try out the preview
Try out the updated documentation on https://nikcio.github.io/Nikcio.UHeadless/v5/fundamentals/getting-started/
Version 5.0.0-preview004
✨ Highlights
- Simpler project structure
- You now only need to reference the
Nikcio.UHeadless
package to get started as all packages are now merged into one.
- You now only need to reference the
- New defaults for Queries and Models
- The new defaults are now simpler and limited to the most common useable queries and models.
- Authorization by default
- This is still a work in progress but the new defaults will include authorization by default which will help ensure you're not exposing too much data.
- Easier to use Typed properties
- This release brings typed or previously 'Named properties' to the forefront and makes them easier to use.
- Typed properties are now available everywhere it makes sense. (See the feature section for more details)
- Cleaner setup with new bootstrapping.
- The new bootstrapping is simpler and more intuitive.
🚀 Features
- Typed properties are now available everywhere it makes sense.
- Use the
TypedPropertes
class for Content items/Media items and Member items - Use the
TypedNestedContentProperties
class for Nested Content items - Use the
TypedBlockListContentProperties
class for Block List items (Content) - Use the
TypedBlockListSettingsProperties
class for Block List items (Settings) - Use the
TypedBlockGridContentProperties
class for Block Grid items (Content) - Use the
TypedBlockGridSettingsProperties
class for Block Grid items (Settings)
- Use the
- New defaults for Queries and Models
- Queries
- Use
ContentAtRootQuery
to get content at the root of your Umbraco site. - Use
ContentByContentTypeQuery
to get content by content type. - Use
ContentByGuidQuery
to get content by guid. - Use
ContentByIdQuery
to get content by id. - Use
ContentByRouteQuery
to get content by route.- Includes built-in support for the Umbraco automatic redirects.
- Use
ContentByTagQuery
to get content by tag. - Use
MediaAtRootQuery
to get media at the root of your Umbraco site. - Use
MediaByContentTypeQuery
to get media by content type. - Use
MediaByGuidQuery
to get media by guid. - Use
MediaByIdQuery
to get media by id. - Use
FindMembersByDisplayNameQuery
to get members by thier display name. - Use
FindMembersByEmailQuery
to get members by email. - Use
FindMembersByRoleQuery
to get members by role. - Use
FindMembersByUsernameQuery
to get members by username. - Use
MemberByEmailQuery
to get a member by email. - Use
MemberByGuidQuery
to get a member by guid. - Use
MemberByIdQuery
to get a member by id. - Use
MemberByUsernameQuery
to get a member by username.
- Use
- Models
ContentItem
is used for Content queries. This has built-in support for redirect information provided byContentByRouteQuery
.MediaItem
is used for Media queries.MemberItem
is used for Member queries.BlockGrid
to support the block grid editor.BlockList
to support the block list editor.ContentPicker
to support the content picker editor and the multi node picker.DateTimePicker
to support the date time picker editor.DefaultProperty
to support editors that doesn't require special modeling. (Used as the fallback)Label
to support the label editor.MediaPicker
to support the media picker editor.MemberPicker
to support the member picker editor. (Now requires Authorization by default to avoid leaking member information. This can be disabled by settingoptions.DisableAuthorization
)MultiUrlPicker
to support the multi url picker editor.NestedContent
to support the nested content editor.RichText
to support the rich text editor and the markdown editor.UnsupportedProperty
to mark properties that are not supported.
- Queries
- Authorization by default [Work in progress]
- Authorization is now enabled by default for all queries to have secure by default queries.
- Authorization is now enabled by default for the
MemberPicker
model to avoid leaking member information. - This can be disabled by setting
options.DisableAuthorization
in theUmbracoHeadlessOptions
.
- New bootstrapping
- Bootstrapping is now simpler and more intuitive. (See the getting started guide at the bottom of this release note)
- The new
ContentPicker
model now supports querying the properties of the picked content. - The
IResolverContext
from HotChocolate has now been added to the default commands so it can be used to resolve services and access query arguments likeCulture
,IncludePreivew
,Fallback
andSegment
. ContentByContentTypeQuery
now supportsincludePreview
to fetch preview content. #229- Context data like
Culture
,IncludePreivew
,Fallback
andSegment
are now provided with theinContext
parameter object on content queries. - Instead of the
UsePaging
attribute from HotChocolate a newPaginationresult
model has been added to avoid problems with the way Umbraco handles content data on queries. This means that theUsePaging
attribute is no longer needed and shouldn't be used in custom queries either.
🧪 Test improvements
- Content query tests have been rewritten and are now more stable.
- Media query tests have been rewritten and are now more stable.
🏛️Project stability
- All projects are now merged into one which makes maintenance easier as this also removes a lot of code as the package could be simplified.
- A new Nikcio.UHeadless.LegacyModels project has been added to help with migration from the old schema to the new schema. (This won't be available as a package but will be available for use for people migrating).
📦 Dependencies
HotChocolate.Data
has been removed as it's no longer needed.
💥 Breaking changes.
- This release is a complete overhaul of the project and therefore a lot of things have changed. A migration guide will be written to help with the migration.
🚧 Try out the preview - Getting started
To get up and running with this preview you can follow the steps below.
- Install the
Nikcio.UHeadless
package. - Add the following code to your
program.cs
file.
using Nikcio.UHeadless;
using Nikcio.UHeadless.Defaults.ContentItems;
using Nikcio.UHeadless.Defaults.MediaItems;
using Nikcio.UHeadless.Defaults.Members;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
builder.CreateUmbracoBuilder()
// ... Default Umbraco setup
.AddUHeadless(options =>
{
// Disable authorization for now as this is still work in progress.
options.DisableAuthorization = true;
options.AddDefaults();
options
.AddQuery<ContentByRouteQuery>()
.AddQuery<ContentByContentTypeQuery>()
.AddQuery<ContentAtRootQuery>()
.AddQuery<ContentByIdQuery>()
.AddQuery<ContentByGuidQuery>()
.AddQuery<ContentByTagQuery>();
options
.AddQuery<MediaByContentTypeQuery>()
.AddQuery<MediaAtRootQuery>()
.AddQuery<MediaByIdQuery>()
.AddQuery<MediaByGuidQuery>();
options
.AddQuery<FindMembersByDisplayNameQuery>()
.AddQuery<FindMembersByEmailQuery>()
.AddQuery<FindMembersByRoleQuery>()
.AddQuery<FindMembersByUsernameQuery>()
.AddQuery<MemberByEmailQuery>()
.AddQuery<MemberByGuidQuery>()
.AddQuery<MemberByIdQuery>()
.AddQuery<MemberByUsernameQuery>();
})
.Build();
WebApplication app = builder.Build();
await app.BootUmbracoAsync().ConfigureAwait(false);
app.UseAuthentication();
app.UseAuthorization();
app.MapGraphQL();
app.UseUmbraco()
// ... Default Umbraco setup
await app.RunAsync().ConfigureAwait(false);
- Run your application and navigate to
/graphql
to see the GraphQL playground. - Fire off a query.
query {
contentAtRoot{
items {
url(urlMode: ABSOLUTE)
name
id
properties {
__typename
}
}
}
}
- Query your properties. To figure out what fragment to write you can use the
__typename
from the previous response. Just make sure to add anI
. You can also use composition types to create fragments.
query {
contentAtRoot{
items {
url(urlMode: ABSOLUTE)
name
id
properties {
... on IMyContentType {
}
__typename
}
}
}
}
Version 5.0.0-preview003
See the program.cs in the integration test project on how to test this preview:
https://github.com/nikcio/Nikcio.UHeadless/blob/contrib/src/Nikcio.UHeadless.IntegrationTests.TestProject/Program.cs
You will need to get the new package Nikcio.UHeadless.Defaults
to get the default queries and their response models.
More docs will come in the future.
✨Highlights
- Simpler project structure
inContext
directive for specifyingculture
andincludePreview
hasFallback
directive for specifying the fallback strategy for a propertyuseSegment
directive for specifying which segment to use when getting a property value.- Typed properties for block lists and block grids
Breaking changes.
This release simplifies the project a ton and therefore it will be easiest to follow once a getting started guide has been written.
Stay tuned and in the mean time try it out on a clean project to explore how the new schema differs.