Skip to content

Releases: nikcio/Nikcio.UHeadless

Version 6.0.0-preview001

29 Aug 13:23
Compare
Choose a tag to compare
Pre-release

✨ 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

29 Aug 12:50
Compare
Choose a tag to compare

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

26 Jun 18:09
94637f3
Compare
Choose a tag to compare

✨ 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.
  • 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)
  • 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.
    • Models
      • ContentItem is used for Content queries. This has built-in support for redirect information provided by ContentByRouteQuery.
      • 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 setting options.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.
  • 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 the UmbracoHeadlessOptions.
  • 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 like Culture, IncludePreivew, Fallback and Segment.
  • ContentByContentTypeQuery now supports includePreview to fetch preview content. #229
  • Context data like Culture, IncludePreivew, Fallback and Segment are now provided with the inContext parameter object on content queries.
  • Instead of the UsePaging attribute from HotChocolate a new Paginationresult model has been added to avoid problems with the way Umbraco handles content data on queries. This means that the UsePaging 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

09 Jun 13:17
94637f3
Compare
Choose a tag to compare
Pre-release

✨ 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.
  • 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)
  • 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.
    • Models
      • ContentItem is used for Content queries. This has built-in support for redirect information provided by ContentByRouteQuery.
      • 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 setting options.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.
  • 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 the UmbracoHeadlessOptions.
  • 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 like Culture, IncludePreivew, Fallback and Segment.
  • ContentByContentTypeQuery now supports includePreview to fetch preview content. #229
  • Context data like Culture, IncludePreivew, Fallback and Segment are now provided with the inContext parameter object on content queries.
  • Instead of the UsePaging attribute from HotChocolate a new Paginationresult model has been added to avoid problems with the way Umbraco handles content data on queries. This means that the UsePaging 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

06 May 05:49
Compare
Choose a tag to compare
Pre-release

✨ 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.
  • 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)
  • 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.
    • Models
      • ContentItem is used for Content queries. This has built-in support for redirect information provided by ContentByRouteQuery.
      • 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 setting options.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.
  • 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 the UmbracoHeadlessOptions.
  • 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 like Culture, IncludePreivew, Fallback and Segment.
  • ContentByContentTypeQuery now supports includePreview to fetch preview content. #229
  • Context data like Culture, IncludePreivew, Fallback and Segment are now provided with the inContext parameter object on content queries.
  • Instead of the UsePaging attribute from HotChocolate a new Paginationresult model has been added to avoid problems with the way Umbraco handles content data on queries. This means that the UsePaging 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.

  1. Install the Nikcio.UHeadless package.
  2. 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);
  1. Run your application and navigate to /graphql to see the GraphQL playground.
  2. Fire off a query.
query {
  contentAtRoot{
    items {
      url(urlMode: ABSOLUTE)
      name
      id
      properties {
        __typename
      }
    }
  }
}
  1. Query your properties. To figure out what fragment to write you can use the __typename from the previous response. Just make sure to add an I. 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

12 Apr 13:33
Compare
Choose a tag to compare
Pre-release

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 specifying culture and includePreview
  • hasFallback directive for specifying the fallback strategy for a property
  • useSegment 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.

Version 5.0.0-preview002

12 Apr 13:19
7e06c19
Compare
Choose a tag to compare
Pre-release

Actions failed see Version 5.0.0-preview003

Version 4.2.1

09 Apr 17:11
Compare
Choose a tag to compare

🩹 Bug fixes

  • Fixed empty strings being returned as arrays.

🏛️Project stability

  • Added more strict analyzers to the project for better warnings and structure in the project

Version 4.2.0

06 Apr 11:51
ec3a673
Compare
Choose a tag to compare

✨ Highlights

  • Umbraco 13 support

🚀 Features

  • Umbraco 13 support

🧪 Test improvements

  • Rewrote tests to be snapshot-based for better regression testing.
  • Converted test projects to use XUnit
  • Converted unit test project to use NSubstitute instead of Moq

📦 Dependencies

  • Updated Microsoft.Extensions.DependencyInjection.Abstractions to 8.0.1
  • Updated Microsoft.Extensions.Logging.Abstractions to 8.0.1
  • Updated HotChocolate.AspNetCore to 13.9.0
  • Updated HotChocolate.AspNetCore.Authorization to 13.9.0
  • Updated HotChocolate.Data to 13.9.0
  • Updated Starlight to version 0.21.4 for the documentation website
  • Updated Astro to version 4.5.16 for the documentation website
  • Added Sharp 0.33.3 as a dependency to the documentation website
  • Updated all Test dependencies to the newest versions
  • Updated all GitHub actions to the newest versions

v4.2.0-preview002

07 Mar 13:47
Compare
Choose a tag to compare
v4.2.0-preview002 Pre-release
Pre-release

This is very preview release of #288 and Umbraco 13 support