Skip to content

Commit

Permalink
Set up GraphQL with IBM Stepzen
Browse files Browse the repository at this point in the history
  • Loading branch information
Rica2021 committed Jul 2, 2024
1 parent 2322e1f commit a75f4c7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
18 changes: 18 additions & 0 deletions api/curl/index.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
type Exercise {
difficulty: String
equipment: String
instructions: String
muscle: String
name: String
type: String
}

type Query {
exercises(muscle: String, name: String): [Exercise]
@rest(
endpoint: "https://api.api-ninjas.com/v1/exercises"
headers: [
{ name: "x-api-key", value: "LMTdvAEXewgLUjhYnFE1RQ==INgGzcNKWRW37ZkZ" }
]
)
}
3 changes: 3 additions & 0 deletions api/index.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
schema @sdl(files: ["curl/index.graphql"]) {
query: Query
}
3 changes: 3 additions & 0 deletions api/stepzen.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"endpoint": "api/invisible-donkey"
}
4 changes: 2 additions & 2 deletions src/app/_layout.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Stack } from "expo-router";
import { Stack, Slot } from "expo-router";

export default function RootLayout() {
return (
<Stack>
<Stack.Screen name="index" options={ {title: "Exercises"}} />
</Stack>
</Stack>
);
}
File renamed without changes.

0 comments on commit a75f4c7

Please sign in to comment.