Sitecore GraphQL schema and query cache reset

As you know GraphQL requires schema to execute your queries. In Sitecore implementation the schema is regenerated every time you touch templates.

What we recently discovered, that if you have separate CD and CM, schema on CD node will not be refreshed after publish.

Luckily, this is quite easy to fix. You need to create an event handler and subscribe it to publish:end:remote event.


public class TemplateUpdateHandler : Sitecore.Services.GraphQL.Content.EventHandlers.TemplateUpdateHandler
{
public TemplateUpdateHandler(IGraphQLEndpointManager endpointManager) : base(endpointManager)
{
}

public void OnPublishEndRemote(object sender, EventArgs e)
{
base.Reset(null);
}
}

Sitecore GraphQL schema and query cache reset

Catching Server-side Rendering Errors in React JSS Apps

It was quite common for Sitecore MVC implementation to add logic around renderings that will catch unexpected exceptions in them and save your page from complete collapse. Such logic hides your component from end users and might only put something in HTML comments, while during preview or editing experience it will give some visual indication of an error and its details.
Such functionality can also be very useful for React JSS applications, but it is not that simple especially on for isomorphic apps leveraging SSR (server-side rendering).

Continue reading “Catching Server-side Rendering Errors in React JSS Apps”
Catching Server-side Rendering Errors in React JSS Apps

Stuck on “Stay tuned” page after SCWDP package deployment

if you generating SCWDP packages for Sitecore you might get stuck at some point with a page saying “Stay Tuned. We are updating…” after deployment. This is what it means…

screenshot_13
Continue reading “Stuck on “Stay tuned” page after SCWDP package deployment”
Stuck on “Stay tuned” page after SCWDP package deployment

Mixing Sitecore JSS and SXA

This investigation of Sitecore JSS and SXA was done quite a while ago, but I didn’t get a chance to post it here. I need to go back to validation of this setup so this will be a living post and I’ll be updating as new findings arrive.

You might ask why would you need to mix them, but the reason is pretty simple. SXA brings a lot of functionality outside of presentation configuration (which I’m not a fan of) that can be useful for any site, like sites management, wizards for sites creation, local data sources, various site settings, etc.

Continue reading “Mixing Sitecore JSS and SXA”

Mixing Sitecore JSS and SXA

Chef scripts for standalone Sitecore provisioning as side-effects of Sitecore-Packer

It’s been a few months since I’ve published Packer templates for Sitecore. Their main purpose is to create Virtual Box images with a fully configured Sitecore instance. So far I have both updates for Sitecore 9.0 CMS and Sitecore Commerce 9.0.1 scripted there.

Recently one of my colleagues was tasked with a configuration of standalone commerce server in private cloud. ARM templates weren’t really useful there and we are too lazy to install everything manually. So we found an interesting side effect of Packer. Continue reading “Chef scripts for standalone Sitecore provisioning as side-effects of Sitecore-Packer”

Chef scripts for standalone Sitecore provisioning as side-effects of Sitecore-Packer