Hi Renata,
Thanks for contacting Syncfusion support.
For fetching data from the GraphQL service we have a support “GraphQLAdaptor”. Using this you can pass the query and fetch data from the server. The Grid action details like paging, filtering, sorting etc. will be sent along with the given query. Please refer to the below code example, documentation and sample link for more information.
|
@Component({
selector: 'app-root',
template: `<ejs-grid [dataSource]='data' [allowPaging]="true" [allowSorting]="true" [allowFiltering]="true">
<e-columns>
. . .
</e-columns>
</ejs-grid>`
})
export class AppComponent {
. . .
ngOnInit(): void {
this.data = new DataManager({
response: {
result: 'getOrders.result',
count: 'getOrders.count'
},
query: `query getOrders($datamanager: DataManager) {
getOrders(datamanager: $datamanager) {
count,
result{
OrderID, CustomerID, EmployeeID, ShipCity, ShipCountry}
}
}`
})
});
}
}
|
Please get back to us if you need further assistance on this.
Regards,
Pavithra S