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: modus/sdk/graphql.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,9 @@ graphql.execute<T> (
48
48
```
49
49
50
50
<ResponseFieldname="T"type="Type"required>
51
-
Type of object to use for the data returned from the query. This can be any type, including a custom type defined in your project. It should match the shape of the data returned from the GraphQL query.
51
+
52
+
Type of object to use for the data returned from the query. This can be any type, including a custom type
53
+
defined in your project. It should match the shape of the data returned from the GraphQL query.
52
54
53
55
<Tip>
54
56
Define custom types in the project's source code. In AssemblyScript, create classes decorated with `@json`.
Copy file name to clipboardExpand all lines: modus/sdk/postgresql.mdx
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,9 +65,9 @@ function postgresql.execute (
65
65
SQL statement containing the query or mutation operation to execute.
66
66
67
67
<Warning>
68
-
While it's possible to directly include parameter values into your SQL statement, it's highly recommended to pass a
69
-
[`Params`](#params) object instead. This can help to prevent against injection attacks and other security
70
-
vulnerabilities.
68
+
While it's possible to directly include parameter values into your SQL statement, it's
69
+
highly recommended to pass a [`Params`](#params) object instead. This can help to prevent
70
+
against injection attacks and other security vulnerabilities.
71
71
</Warning>
72
72
</ResponseField>
73
73
@@ -92,7 +92,8 @@ function postgresql.query<T>(
92
92
```
93
93
94
94
<ResponseFieldname="T"type="Type"required>
95
-
Type of object to use for the data returned from the query. This can be any type, including a custom type defined in your project. It should match the shape of the row returned from the SQL query.
95
+
Type of object to use for the data returned from the query. This can be any type, including a custom
96
+
type defined in your project. It should match the shape of the row returned from the SQL query.
96
97
97
98
<Tip>
98
99
Define custom types in the app's source code. In AssemblyScript, create classes decorated with `@json`.
@@ -114,9 +115,9 @@ If working with PostgreSQL's `point` data type, you can use a [`Point`](#point)
114
115
SQL statement containing the query or mutation operation to execute.
115
116
116
117
<Warning>
117
-
While it's possible to directly include parameter values into your SQL statement, it's highly recommended to pass a
118
-
[`Params`](#params) object instead. This can help to prevent against injection attacks and other security
119
-
vulnerabilities.
118
+
While it's possible to directly include parameter values into your SQL statement, it's highly
119
+
recommended to pass a [`Params`](#params) object instead. This can help to prevent against
120
+
injection attacks and other security vulnerabilities.
120
121
</Warning>
121
122
</ResponseField>
122
123
@@ -154,9 +155,9 @@ function postgresql.queryScalar<T> (
154
155
SQL statement containing the query or mutation operation to execute.
155
156
156
157
<Warning>
157
-
While it's possible to directly include parameter values into your SQL statement, it's highly recommended to pass a
158
-
[`Params`](#params) object instead. This can help to prevent against injection attacks and other security
159
-
vulnerabilities.
158
+
While it's possible to directly include parameter values into your SQL statement, it's highly
159
+
recommended to pass a [`Params`](#params) object instead. This can help to prevent against
160
+
injection attacks and other security vulnerabilities.
160
161
</Warning>
161
162
</ResponseField>
162
163
@@ -185,8 +186,9 @@ want to include. Then pass the object to the `execute`, `query`, or `queryScalar
185
186
with your SQL statement.
186
187
187
188
<ResponseFieldname="push(value)">
188
-
Push a parameter value into the list included with the SQL operation. The sequence of calls to `push` determines the
189
-
order of the parameters in the SQL statement. This corresponds to the order of the `?` placeholders or `$1`, `$2`, etc.
189
+
Push a parameter value into the list included with the SQL operation. The sequence of calls to
190
+
`push` determines the order of the parameters in the SQL statement. This corresponds to the order
191
+
of the `?` placeholders or `$1`, `$2`, etc.
190
192
191
193
<ResponseFieldname="value"type="any"required>
192
194
The value of the parameter to include in the SQL operation.
Copy file name to clipboardExpand all lines: quickstart.mdx
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,8 @@ to deploy it to Hypermode.
23
23
intelligent functions and APIs, powered by WebAssembly. With Hypermode, you can deploy,
24
24
secure, and observe your Modus apps.
25
25
26
-
To get started, [create your first Modus app](/modus/quickstart). You can import this app into Hypermode in the next step.
26
+
To get started, [create your first Modus app](/modus/quickstart). You can import this app into
27
+
Hypermode in the next step.
27
28
28
29
</Step>
29
30
<Steptitle="Import Modus app">
@@ -45,20 +46,22 @@ to deploy it to Hypermode.
45
46
npm install -g @hypermode/hyp
46
47
```
47
48
</CodeGroup>
48
-
From the terminal, run the following command to import your Modus app into Hypermode. This command will create your Hypermode project and deploy your app.
49
+
From the terminal, run the following command to import your Modus app into Hypermode. This command
50
+
will create your Hypermode project and deploy your app.
49
51
50
52
```bash
51
53
hyp init
52
54
```
53
55
</Tab>
54
56
</Tabs>
55
57
56
-
When Hypermode creates your project, a runtime is initiated for your app as well as connections to any [Hypermode-hosted models](/hosted-models).
58
+
When Hypermode creates your project, a runtime is initiated for your app as well as connections to
59
+
any [Hypermode-hosted models](/hosted-models).
57
60
58
61
</Step>
59
62
<Steptitle="Explore API endpoint">
60
-
After deploying your app, Hypermode lands you in your project home. You can see the status of your project
61
-
and the API endpoint generated for your app.
63
+
After deploying your app, Hypermode lands you in your project home. You can see the status of your
64
+
project and the API endpoint generated for your app.
62
65
63
66
From the **Query** page, you can run a sample query to verify it's working as expected. In the following
64
67
query, we're going to use the `generateText` function to generate text from the shared Meta Llama
@@ -79,9 +82,9 @@ to deploy it to Hypermode.
79
82
</Step>
80
83
<Steptitle="Observe function execution">
81
84
Let's dig deeper into the behavior of our AI service when we ran the query by looking at the
82
-
**Inferences** page. You can see the step-by-step inference process and the inputs and outputs of the
83
-
model at each step of your function. We can see in this case, it took Llama 4.4 seconds to reply to the prompt. We
84
-
can also see the parameters on both the inputs and outputs.
85
+
**Inferences** page. You can see the step-by-step inference process and the inputs and outputs of
86
+
the model at each step of your function. We can see in this case, it took Llama 4.4 seconds to
87
+
reply to the prompt. We can also see the parameters on both the inputs and outputs.
0 commit comments