You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/data-management/API-CONNECTION.md
+20-10Lines changed: 20 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,38 @@
1
1
---
2
-
id: backend-connection
3
-
slug: /backend-connection
4
-
title: Backend connection
5
-
sidebar_position: 4
2
+
id: api-connection
3
+
slug: /api-connection
4
+
title: API connection
5
+
sidebar_position: 1
6
6
tags:
7
7
- Backend
8
+
- API
8
9
- react-query
9
10
- axios
10
11
- react native
11
12
- orval
12
-
description: Backend connection - check how to fetch data from backend and display it for users
13
+
description: API connection - check how to fetch data from backend and display it for users
13
14
---
14
15
15
-
# Backend connection
16
+
# API connection
16
17
17
-
This template uses this packages to keep connection with backend:
18
+
This template uses this packages to keep connection with API:
18
19
19
-
-[axios](https://axios-http.com/docs/intro) - direct calls to backend
20
+
-[axios](https://axios-http.com/docs/intro) - direct calls to API
20
21
-[react-query](https://tanstack.com/query/latest/docs/framework/react/overview) - use hooks that helps displaying data on UI
21
-
-[orval](https://orval.dev/overview) - generating query hooks based on swagger (provided by backend)
22
+
-[orval](https://orval.dev/overview) - generating query hooks based on swagger (provided by backend developers)
23
+
24
+
:::note
25
+
If you are not using swagger (or open API v3) on your backend side it could be hard for you to make this working, because we are using [orval](https://orval.dev/overview) to auto generate everything.
26
+
27
+
If you will have any issues please contact **[Mateusz Rostkowski](https://www.github.com/MateuszRostkowski)**
28
+
:::
22
29
23
30
## Generate new query
24
31
25
-
1. Get `swagger-spec.json` - example: https://gist.github.com/lenage/08964335de9064540c8c335fb849c5da
32
+
All api connection code is automatically generated based on swagger schema, you will just need to do this few steps to update your code base.
33
+
34
+
1. Get `swagger-spec.json` from backend - example: https://gist.github.com/lenage/08964335de9064540c8c335fb849c5da
35
+
- This also could be automaticaly done, probably we will work on it soon :)
0 commit comments