mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
657 B
27 lines
657 B
/*
|
|
* Squidex Headless CMS
|
|
*
|
|
* @license
|
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
|
|
*/
|
|
|
|
import { HttpClient } from '@angular/common/http';
|
|
import { Injectable } from '@angular/core';
|
|
import { Observable } from 'rxjs';
|
|
|
|
import { ApiUrlConfig } from '@app/framework';
|
|
|
|
@Injectable()
|
|
export class GraphQlService {
|
|
constructor(
|
|
private readonly http: HttpClient,
|
|
private readonly apiUrl: ApiUrlConfig
|
|
) {
|
|
}
|
|
|
|
public query(appName: string, params: any): Observable<any> {
|
|
const url = this.apiUrl.buildUrl(`api/content/${appName}/graphql`);
|
|
|
|
return this.http.post(url, params);
|
|
}
|
|
}
|