1.53.2 (Jun 22, 2023)

Options
Chris Coleman
Chris Coleman Administrator

ADMIN

edited June 2023 in ? Releases

📤 New Function - Post Process

Post Process allows you to add additional logic to your function stack that will execute after the API returns its designated response. This will allow you to reduce the time it takes for your APIs to respond if there is additional logic that you need to perform that is not required to generate the response. Some examples could be sending an email to a user after they have signed up, or performing data transformation after a form submission.

Located under Utility Functions, Post Process is available to all of our users. See more about this new function in our documentation here.

🥳 The most infamous Xano bug — resolved!

No longer should you ever have to worry about trying to reference a variable and the data type being set to 'text' incorrectly. This also includes new tab to complete for variable names in the function stack.

Need to use a value that happens to match a variable? No problem! Just swap the type back to text and you're all set.

📇 Direct Query Function with new Query Wizard

Last release, we introduced our Direct Database Query function, which is now available to all of our users on the Scale plan and higher. We are now including a Query Wizard, allowing you to quickly build advanced queries via direct SQL statements in your function stack. See more in our documentation here.

↩️ Undo / ↪️ Redo Support in Database View

We are excited to introduce even more improvements to the database view! This time, we've added undo / redo support, including a history of events. Use the new buttons in the top bar, or Crtl/Cmd+Z / Y on your keyboard. You can also right-click on the icons to view the history and quickly jump to a specific point.

🕰️ New Timestamp Filters

to_ms / to_seconds / to_minutes / to_hours / to_days

We've added more filters to make working with timestamps even easier. These filters can take a variety of inputs, including human-readable dates and times, and format them into a value representing the amount of ms / seconds / minutes / hours / days since the UNIX Epoch. View the documentation here.

🥌 Copy as cURL in Run & Debug

Quickly copy a cURL command for any of your Xano APIs via Run & Debug!

📖 New Lambda Libraries

🐜 Misc. Bug Fixes

  • Visual bug when merging a branch that includes a query using joins, the joined table name would not be present in merged queries, although the query still ran as expected.
  • Some fixes to the Metadata API in relation to adding new tables

We hope you enjoy these improvements to the Xano platform! As always, please leave any questions or comments below. If you're experiencing any issues post-release, please reach out to us via support chat in Xano.

🤗 Want to submit a feature request? Click here.

🎶 View the full release notes here.

🤩 What else is happening at Xano?

  • If you haven't already, say hello to our new Developer Community Manager, @lizanaya!
  • Last week, we introduced a new, more streamlined triage in our Support Chat. This means less friction for you to get the help you need, and introduces new automations for the Customer Success team to more quickly identify high priority issues faster.
  • Over on our 🎥 YouTube channel, we recently introduced:

Comments

  • MattLaro
    MattLaro Member ✭✭
    edited June 2023
    Options

    Hmmmm I'm not quite sure "The most infamous Xano bug — resolved!" is 100% the best way to do so. Let's say I have a variable employee and I want to assign a user_type as "employee" text value in the same function stack… will I fight with Xano to enter it as Text?

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    @MattLaro Nope — you can just change the type to 'text' and you're all set.

  • MattLaro
    MattLaro Member ✭✭
    Options

    @Chris Coleman Alright, thank you for your feedback! Good job! :)

  • MattLaro
    MattLaro Member ✭✭
    edited June 2023
    Options

    I'm really glad about the post process! It was something missing.

    Question though : Does the timing of when the post process is called takes in account the step in the function stack ?

    Example :

    1. I do something with my var_1 = "Hello"
    2. I call post process using var_1
    3. I update the var_1 = "World"

    Will 2 be using "Hello" or "World" once the function processing is finished ?

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    edited June 2023
    Options

    @MattLaro 2 will use "World" "Hello". Post process does not execute any of its logic until the API delivers a response, regardless of where the post process function is placed in the function stack.

  • MattLaro
    MattLaro Member ✭✭
    Options

    Alright! This is good to know :) Perhaps "locking" all post process at the end of the stack would prevent any upcoming confusion in this case. It does make sense.

    Thank you again!

  • MattLaro
    MattLaro Member ✭✭
    Options

    Another question about post processing. Will it execute only on a successful response (no failed precondition or internal error response)?

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    @MattLaro Post processing will only execute on a successful response.

  • mauromequelussi
    Options

    AuthMe started to crash after the update. Anyone else facing this?

  • MattLaro
    MattLaro Member ✭✭
    Options

    @Mauro Mequelussi-40201 Yes, it is an ongoing issue. It is mentioned in a rectangle when you open a support chat 😁. Only affects test datasources though.

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    @Mauro Mequelussi-40201 Please reach out to support if you're still seeing this. Thank you!

  • mauromequelussi
    mauromequelussi Member
    edited June 2023
    Options

    Fields of json type are not showing value on click.

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    @Mauro Mequelussi-40201 Clearing your browser cache should resolve this, or you can hang tight for a hotfix which is rolling out now.

  • Stefan Pointecker
    Options

    Is it possible to use "EXPLAIN" in the native query builder to test query performance?

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    @MattLaro It seems I was incorrect; post-process will use the state of the variables where it is defined. In your example, step 2 will use 'hello'.

  • MattLaro
    MattLaro Member ✭✭
    edited June 2023
    Options

    @Chris Coleman Awesome! Using multiple post processing in a function with the current state of the objects makes this feature amazing! Thank you :)

  • MattLaro
    MattLaro Member ✭✭
    edited June 2023
    Options

    Just a heads up on concat filter's new behaviour that may now induce some bugs (to whom it may apply).

    All older concatenated values that were explicitly handled as text are now treated as the value it is detected to be.

    I had some concatenation that were previously adding 000 at the end of a text value that were only numbers.

    Example : Suppose I was concatenating text "Hello" with 000.

    Previously, the concatenated value was handled as text 100% of the time, so it would result Hello000.

    Now, it is handled Hello0 because 000 is now considered an integer and converts to an integer before converting to text… and must now be explicitly declared as text to prevent this conversion (by clicking on the const tab and chose "text").

    Same for 001. You'll get "Hello1" and not "Hello001" for the same reason.

    I'm a bit sour about this change since it affected already existing stuff and I wonder if it is really the correct way to go. It's just a bit unintuitive.

  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options

    @MattLaro looks like a regression. 001 should be treated as text.

    We don't have another release scheduled for a few weeks, so for the time being use the solution you described.

  • Inayet
    Inayet Member
    Options

    @Chris Coleman love the 'New Timestamp Filters' and the cURL. I am seeing the cURL however, am not seeing new timestamps filters, are these plan specifics?

  • Inayet
    Inayet Member
    Options

    Hi @Sean Montgomery hopefully a few of the new hires are on your team, would love more frequent updates and feature rollouts. Keep up the wonderful work.

  • sepirak-nick
    sepirak-nick Member
    Options

    Question about the post process function. I should be able to reference variables outside of what's in the Post Process stack, right? So long as they exist before it's defined?

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    @sepirak-nick Correct. There is an issue right now with Post Process not able to reference inputs which will be fixed later on, so if you need it to look at inputs, make sure to just dump those into a variable first.

  • sepirak-nick
    sepirak-nick Member
    Options

    @Chris Coleman Ah, that's the bug I'm running into right now, thanks for the clarification.

  • rupesh
    rupesh Member
    Options

    Post Process is a much-needed and much-welcomed feature. Thanks for the update.

    However, I noticed that the request history does not show the details of the stack inside post process. So we don't get the information if some step inside post process fails and we also don't get the time required to execute each step inside the post process stack.

    Though this can be seen in run & debug while testing. It will be very useful if we can get access to these crucial pieces of information through "Request History" when the app is Live.

  • tomekw
    tomekw Member
    Options

    Hi,

    Post Process is a great function. Thanks!

    Although, when trying to access "input" variables inside Post Process I am getting an error "Unable to locate input". I need to assign the API input to variable and then it's accessible inside Post Process function.

    Is this a bug or a feature? :)

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    @tomekw This is a bug, and should be fixed soon.

  • MattLaro
    MattLaro Member ✭✭
    edited July 2023
    Options

    There is a small annoyance introduced by this update regarding " The most infamous Xano bug — resolved!". Whenever you want to refer something by ID, which happens ALL THE TIME when it's in the database, it will select auth:id by default.

    You then have to be careful to not to have accidentally selected auth:id, which is the opposite problem to leaving a value to text. There are many instances I was not careful and used the variable value instead of text value.

    I still think the solution just flipped the problem around, but it's far from ideal. I wouldn't call this exactly "resolved" 😥. Clicking away to leave it as "text" was easier than selecting const… and then having to select const each and every time you edited that field.

  • Sam
    Sam Member
    Options

    I experience the same frustration as MattLaro, and don't want to use a lambda function ?.id to just get the ID out.
    For some instance I will put the precondition to make sure there is an ID field, but most of the time I just want to use the get filter to get the ID out and return null if it isn't.
    Please provide another way referring ID.

  • jakespirek
    jakespirek Member, Administrator

    ADMIN

    Options

    Hi @MattLaro

    Thanks for sharing this feedback. We are working on a fix for this so that it doesn't automatically default to auth.id.