London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Graph - schema update

Vote:
 

I am experimenting using Graph QL.

I am adding new properties to a given block type, but I am finding that I have to run the "Content Graph content synchronization" job before the schema is updated on the Graph database.
I can update existing fields and that content is synced, but the new fields cannot be queried until I run the job.

is this expected behaviour, or is there something else I need to do to allow schema updates without the full resync?

#306097
Aug 02, 2023 10:59
Vote:
 

It should sync content type changes automatically: https://docs.developers.optimizely.com/digital-experience-platform/v1.4.0-content-graph/docs/synchronizing-from-site

As a first step, I would review the setup instructions, and make sure it's fully configured (including the Content Delivery API setup): https://docs.developers.optimizely.com/digital-experience-platform/v1.4.0-content-graph/docs/installation-and-configuration

#306104
Aug 02, 2023 16:33
Vote:
 

Thanks for the reply Daniel.

I've setup as per the documentation (I had missed off the "Include" section). However, it's still not syncing newly created fields.

If I add a property to an existing Content (block) type or create a completely new one, it won't appear in the graph until I do a full sync.
I am creating/updating the block content each time.

My config is as follows:

  "Optimizely": {
    "ContentGraph": {
      "ContentVersionSyncMode": "PublishedOnly",
      "SyncReferencingContents": "true",
      "Include": {
        "ContentIds": [],
        "ContentTypes": []
      },
      "OnlySyncContentTypesInWhitelistToSchema": false,
      "GatewayAddress": "https://cg.optimizely.com",
      "AppKey": "b...W",
      "Secret": "g..B",
      "SingleKey": "H..M",
      "AllowSendingLog": "true"
    }
  }

And code in Startup.cs:

        services.ConfigureContentApiOptions(o =>
        {
            o.IncludeInternalContentRoots = true;
            o.IncludeSiteHosts = true;
            o.EnablePreviewFeatures = true;
            o.SetValidateTemplateForContentUrl(true);
        });
        services.AddContentDeliveryApi();
        services.AddContentGraph(_configuration);
#306155
Aug 03, 2023 7:26
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.