New DateTime and TimeSpan Tag Helpers, DiscoverableSterotypes to GraphQLContentOptions - This week in Orchard (23/02/2024)

Gábor Domonkos's avatar
Announcement, Documentation, This week in Orchard, Tag Helpers, GraphQL

New DateTime and TimeSpan Tag Helpers and adding DiscoverableSterotypes to GraphQLContentOptions are the topics for this week. Let's check them out in detail!

Orchard Core updates

New DateTime and TimeSpan Tag Helpers

Now, you can use the new DateTime and TimeSpan Tag Helpers. The DateTime Tag Helper has a Utc and a Format attribute. The Utc attribute is a DateTime? and the Format is the format of the datetime. And when it's rendered, it's creating a DateTime shape. You can utilize this Tag Helper like: <datetime utc="@contentItem.ModifiedUtc" format="g" />

The TimeSpan Tag Helper has a Utc attribute, which is a DateTime? and an Origin attribute which is also a nullable DateTime. The Tag Helper will calculate the difference between these two dates using the TimeSpan shape and will give you something like "2 days ago" or "3 minutes ago". You can utilize this Tag Helper like: <timespan utc="@Clock.UtcNow" origin="@contentItem.ModifiedUtc" />

DateTime and TimeSpan Tag Helpers

DiscoverableSterotypes to GraphQLContentOptions

This is a new option that you can use to set the stereotypes that will be available in the GraphQL queries. When identifying content types for GraphQL exposure, we identify those without a stereotype to provide you with control over the behavior of stereotyped content types. A new option, DiscoverableSterotypes, has been introduced in GraphQLContentOptions. This allows you to specify stereotypes that should be discoverable by default.

For instance, if you have several content types stereotyped as ExampleStereotype, you can make them discoverable by incorporating the following code into the startup class:

services.Configure<GraphQLContentOptions>(options =>

You can read more about configuring contents in the official documentation of Orchard Core.

Add DiscoverableSterotypes to GraphQLContentOptions

News from the community

Orchard Harvest 2024 survey

For those too young to remember, we had Orchard conferences, called Orchard Harvest. The conference website was available under, but unfortunately, it's not anymore. The last in-person one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference.

The point is that we should think about organizing the next in-person one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part.

After last year, the Orchard Harvest Conference will be held again in 2024. Last year, it was held online due to economic reasons. But first, we would like to assess the potential interest and what would be needed. You can fill in the questionnaire here, which should take about 5 minutes.

Share your thoughts with us in the survey. We are curious about who we will meet in 2024! :)

Orchard Harvest 2024 survey

Work with Lombiq!

Do you like developing apps with Orchard Core? Would you like to apply your skills to some of the most challenging Orchard Core apps out there, working with other OC experts? Then come work with us at Lombiq, the biggest Orchard Core team in the world!

We've been contributors, supporters, and users of Orchard Core and Orchard 1 for more than a decade (Benedek Farkas and Zoltán Lehóczky, the two founders, for even more), with a huge open-source portfolio. There, you can also check out the code we write, and some of the projects you could take part in.

We do a lot. Ready for keywords? Open-source, Orchard Core CMS, .NET software development, ASP.NET Core MVC, distributed team, cloud-first, Microsoft Azure, self-funded R&D, Vue.js, jQuery, Bootstrap, SASS, training, hosting and operations, GitHub Actions, TeamCity, support, SaaS (the only Orchard CMS SaaS, DotNest), Selenium UI testing, xUnit, university courses. And also, greenfield experimental projects like Hastlayer, turning software into computer chips.

Write to us at [email protected], and let's talk!

Lombiq's GitHub page

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 476 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course.

Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here!

If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

No Comments

Add a Comment