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
* remove reference of renameModelFields
* add code examples for angular
* add angular specific code examples
* add angular and vue examples
* update vue example
* add angular example for polly
* add angular example for bedrock
* add angular example for rekognition
* remove complete example from angular and vue pages
Copy file name to clipboardExpand all lines: src/pages/[platform]/build-a-backend/data/connect-to-existing-data-sources/connect-postgres-mysql-database/index.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -208,7 +208,7 @@ When deploying your app to production, you need to [add the database connection
208
208
209
209
## Rename generated models and fields
210
210
211
-
To improve the ergonomics of your API, you might want to rename the generate fields or types to better accommodate your use case. Use the `renameModels()`and `renameModelFields()` modifiers to rename the auto-inferred data models and their fields.
211
+
To improve the ergonomics of your API, you might want to rename the generate fields or types to better accommodate your use case. Use the `renameModels()`modifier to rename the auto-inferred data models.
212
212
213
213
```ts
214
214
// Rename models or fields to be more idiomatic for frontend code

When using TypeScript, you frequently need to specify data model types for type generics. For instance, with React's `useState`, you provide a type in TypeScript to ensure type-safety in your component code using the state. Use the `Schema["MODEL_NAME"]["type"]` pattern to get TypeScript types for the shapes of data models returned from the backend API. This allows you to get consumable TypeScript types for the shapes of the data model return values coming from the backend API.
221
+
When using TypeScript, you frequently need to specify data model types for type generics.
For instance, with React's `useState`, you provide a type in TypeScript to ensure type-safety in your component code using the state. Use the `Schema["MODEL_NAME"]["type"]` pattern to get TypeScript types for the shapes of data models returned from the backend API.
You can combine the `Schema["MODEL_NAME"]["type"]` type with the `SelectionSet` helper type to describe the return type of API requests using the `selectionSet` parameter:
0 commit comments