Skip to content

Commit

Permalink
fix: fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
annarieger committed Jun 28, 2022
1 parent 916e397 commit 8fee58f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/service/GraphQLService/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export interface GraphQLQueryObject {
};

export interface GraphQLResponse<T> {
data: T[];
data: {
[key: string]: T[]
};
errors?: any;
};

Expand All @@ -33,7 +35,7 @@ export class GraphQLService {
this.keycloak = opts.keycloak;
}

async sendQuery<T>(query: GraphQLQueryObject, fetchOpts?: RequestInit): Promise<any> {
async sendQuery<T>(query: GraphQLQueryObject, fetchOpts?: RequestInit): Promise<{[key: string]: T[]}> {
try {
const response = await fetch(this.basePath, {
method: 'POST',
Expand Down

0 comments on commit 8fee58f

Please sign in to comment.