Use the FetchApi for GraphiQL endpoints in the example app
Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
This commit is contained in:
committed by
Gustaf Räntilä
parent
b2fbeed540
commit
01c4b9e92a
@@ -33,6 +33,7 @@ import {
|
||||
createApiFactory,
|
||||
discoveryApiRef,
|
||||
errorApiRef,
|
||||
fetchApiRef,
|
||||
githubAuthApiRef,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { AuthProxyDiscoveryApi } from './AuthProxyDiscoveryApi';
|
||||
@@ -53,18 +54,24 @@ export const apis: AnyApiFactory[] = [
|
||||
|
||||
createApiFactory({
|
||||
api: graphQlBrowseApiRef,
|
||||
deps: { errorApi: errorApiRef, githubAuthApi: githubAuthApiRef },
|
||||
factory: ({ errorApi, githubAuthApi }) =>
|
||||
deps: {
|
||||
errorApi: errorApiRef,
|
||||
fetchApi: fetchApiRef,
|
||||
githubAuthApi: githubAuthApiRef,
|
||||
},
|
||||
factory: ({ errorApi, fetchApi, githubAuthApi }) =>
|
||||
GraphQLEndpoints.from([
|
||||
GraphQLEndpoints.create({
|
||||
id: 'gitlab',
|
||||
title: 'GitLab',
|
||||
url: 'https://gitlab.com/api/graphql',
|
||||
fetchApi,
|
||||
}),
|
||||
GraphQLEndpoints.github({
|
||||
id: 'github',
|
||||
title: 'GitHub',
|
||||
errorApi,
|
||||
fetchApi,
|
||||
githubAuthApi,
|
||||
}),
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user