Issues when connecting Schedule with DataManager using GraphQLAdaptor

Hello,


I'm trying to use a DataManager using GraphQLAdaptor as a dataSource for the Schedule Component.

In my Component, I am initializing the eventSettings.

My issue is that the events from the backend are not loaded in the Schedule Component and I don't really see any error or issue that can result in this behavior.

The datamanager seems to fetch the data if I call it manually on the Init function, but the events are not visible.

Did you encounter similar issues?

Do I need to respect another structure for my data or do any kind of changes?

This is the data returned by the datamanager:

Image_5960_1725806225919


2 Replies 1 reply marked as answer

SS Sorin Steflea September 8, 2024 02:45 PM UTC

component code:

Image_5731_1725806688672

html code:

Image_3988_1725806704920



VR Vijay Ravi Syncfusion Team September 9, 2024 02:50 PM UTC

Hi Sorin Steflea, 

To use the DataManager with GraphQLAdaptor as a dataSource for the ScheduleComponent in Angular, you need to ensure a few things:

 

The data returned from the backend should match the structure expected by the ScheduleComponent. The ScheduleComponent expects an array of objects, where each object represents an event and has properties like Id, Subject, StartTime, EndTime, etc. Make sure your backend is returning data in this format.

 

The GraphQLAdaptor needs to be properly configured with the correct query and mutation strings. Make sure your GraphQLAdaptor is correctly set up and is able to fetch data from your GraphQL server.

 

The DataManager should be correctly linked to the ScheduleComponent via the eventSettings property. Make sure you're passing the DataManager instance to the dataSource property of eventSettings. Can you check our shared github example using GraphQLAdaptor.

Github Sample: https://github.com/SyncfusionExamples/ej2-angular-scheduler-crud-graphql-adaptor/tree/master


Don't hesitate to get in touch if you require further help or more information.

Regards,

Vijay


Marked as answer
Loader.
Up arrow icon