generated from cloudoperators/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(heureka): integrate GraphQL backend (#779)
* chore(heureka): codegen integration * feat(heureka): list services * test(heureka): supply mock data instead of mocking component --------- Co-authored-by: Wowa <[email protected]>
- Loading branch information
Showing
21 changed files
with
4,755 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"heureka-next": minor | ||
--- | ||
|
||
The app is now able to communicate with the GraphQL backend. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# | ||
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
API_ENDPOINT=SOME_URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"apiEndpoint": "YOUR_GRAPHQL_API_ENDPOINT", | ||
"embedded": false, | ||
"theme": "light" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { CodegenConfig } from "@graphql-codegen/cli" | ||
import * as dotenv from "dotenv" | ||
|
||
// Load environment variables from .env file | ||
dotenv.config() | ||
|
||
const config: CodegenConfig = { | ||
schema: process.env.API_ENDPOINT, | ||
documents: "src/**/*.graphql", | ||
|
||
generates: { | ||
"src/generated/graphql.tsx": { | ||
plugins: ["typescript", "typescript-operations", "typescript-react-apollo"], | ||
config: { | ||
withHooks: true, | ||
withHOC: false, | ||
withComponent: false, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ApolloClient, InMemoryCache } from "@apollo/client" | ||
|
||
type ClientOptions = { | ||
uri?: string | ||
} | ||
|
||
export const getClient = ({ uri }: ClientOptions) => { | ||
if (typeof uri === "undefined") { | ||
throw new Error("No API endpoint provided.") | ||
} | ||
return new ApolloClient({ | ||
uri, | ||
cache: new InMemoryCache(), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
apps/heureka-next/src/components/Shell/ShellContent/ShellContent.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.