Skip to main content

The Function Stack

One of Xano's main features, allowing you to build what you want.

Cameron Booth avatar
Written by Cameron Booth
Updated over 5 months ago

When building any business logic inside Xano (or when we're making the data do the things we want it to do), we use this feature to accept values, manipulate values, and then return values to the user.
​

It can be found when building APIs, Tasks, Functions, Triggers, and Middleware. The concept is largely the same.
​

Note: Tasks do not have inputs, as they run automatically, and often rely on values queried from the database, or an External API source.

Inputs

Inputs are values that we pass into the Function Stack. These are values that we can specify elsewhere, and then use in our actual logic workflow.
​

Inputs can be all kinds of values. We support numbers, texts, files, dates, timestamps, and more. We also support specifying whether the values are singular values, or list values.

You can read more about inputs here in our documentation.

Logic

Inside the Function Stack component of the Function Stack, we can use our inputs. We can also query data from elsewhere: either through your database, or an API. To say, inputs aren't the only way that we can add data to the Function Stack.


But, as you use the function stack, keep in mind that the data you'll be using will be in JSON.

Response


The response is the end-result of our function stack. We can keep it empty, or we can fully customize its output. If you're looking for ways to customize the response, you can see how to do so here.

The response JSON can be used to help with displaying data on your frontend, or it can even be used within your backend logic as it "communicates" with each other.

Did this answer your question?