Skip to main content

· 7 min read
Agnes Lin

Originally published on strongloop.com

LoopBack 4 now offers a new feature: inclusion of related models! This addition not only simplifies querying data in LoopBack 4, but since we have similar features in LoopBack 3 it also closes one feature gap between LoopBack 3 as well. The idea is to use the inclusion resolver, which is a function that helps to query data over different relations, to achieve such simplifications for us.

Here is a simple use case of inclusion: a customer has many orders.

hasMany

If we'd like to get a customer's instance with all their orders instances, we can query on Customer with filter {include: [{relation: 'orders']}. The inclusion resolvers are similar to GraphQL resolvers -- it will find the target instances of Customer first and pass its result to the inclusion resolver of orders. The query result will contain the return value of orders nested under corresponding Customer instead of connecting to database twice. Read on for detailed examples and explanations!

· 5 min read
Diana Lau
Agnes Lin

Originally published on strongloop.com

For the past few months, the LoopBack team has been busy improving the framework. Aside from implementation, we also did some investigation to plan out road map for the incoming new features. Here are our main focuses in last quarter:

We have a monthly blog reviewing what we've done in each milestone. To stay tuned, don't forget to follow us on Twitter @StrongLoop.

Let's take a closer look at each of the epic.

· 5 min read
Miroslav Bajtoš

Originally published on strongloop.com

It has been almost a year since LoopBack 4.0 GA was announced. Since then, we have been working hard on closing the feature gap between the new and the old versions and looking for ways to simplify migration of projects built on LoopBack 3.

In June, we announced a new feature that allows LoopBack 3 applications to be mounted in LoopBack 4 projects, allowing developers to start writing new features using LoopBack 4 while keeping existing APIs powered by LoopBack 3 (Read more about it in this blog post).

Today, we are happy to announce a preview version of a tool automating migration of models from LoopBack 3 to LoopBack 4:

lb4 import-lb3-models

· 9 min read
Agnes Lin

Originally published on strongloop.com

All the leaves are red and the flowers are fading away. In this season of fruitfulness, the LoopBack team accomplished their planned September milestone goals. Besides delivering code-related contributions, we also addressed the growing number of reported issues from the growing number of users from the GitHub community. I believe that with the effort from our team and the contribution from the community, we are crafting LoopBack to a better framework.

Here are our main focuses from September:

  • Enhancement of Authentication/Authorization
  • Declarative Building of REST APIs
  • Importing of LB3 Model JSON File To LB4 Model Class
  • Inclusion Resolver in Relations

See the September milestone for an overview of what we have worked on, and read on for more details.

· 7 min read
Janny Hou

Originally published on strongloop.com

The last month of summer started with exiting news that LoopBack won the "Best in API Middleware award"🎉, which is a great recognition of our team's achievement and effort. With those efforts in mind, here's the highlights of what we worked on in August:

  • The implementation of InclusionResolver has made significant progress in the Inclusion epic.
  • A new epic to simplify building REST APIs is started with some pre-work and spike.
  • We contributed a LoopBack stack for Kabanero/Appsody to enable cloud native development experience.
  • The first version of @loopback/authorization was released for users to try.

You can read more to learn the new features in details.

· 16 min read
Wen Bo

Originally published on strongloop.com

Part 6: Front-end with React

In This Episode

Now our project is on IBM Cloud. But you may notice there is not anything that we can actually play with. It's just some APIs. How can we call it a game without front-end UI?

In this episode, I will build signup, login, and home pages with React.

You can check here for the code from this episode.

· 5 min read
Diana Lau

Originally published on strongloop.com

Previously, we looked at how to add a global interceptor. In this article, we are going to build an application that validates the incoming request using class level and method level interceptors 

For the complete application, you can go to this repo: https://github.com/dhmlau/loopback4-interceptors

· 3 min read
Dave Whiteley

Originally published on strongloop.com

We're excited to congratulate the LoopBack team for earning the 2019 API Award for the "Best in API Middleware" category. LoopBack is a highly extensible, open source Node.js framework based on Express that enables you to quickly create dynamic end-to-end REST APIs and connect to backend systems such as databases and SOAP or REST services.

The 2019 API Awards celebrate the technical innovation, adoption, and reception in the API & Microservices industries and use by a global developer community. The 2019 API Awards will be presented at the 2019 API Awards Ceremony during the first day of API World 2019 (Oct 8-10, 2019, San Jose Convention Center), the world’s largest API & Microservices conference & expo -- the largest event for the API economy -- in its 8th year, with over 3,500 attendees.

· 9 min read
Agnes Lin

Originally published on strongloop.com

This July 20th was the 50th anniversary of The Moon Landing and the famous quote, "That's one small step for man, one giant leap for mankind." This great, memorable event reminds me that every task the LoopBack team finishes will end up enhancing our project. From starting to build new features such as inclusion, to enriching the documentation, we believe that we are making LoopBack better by taking all these small steps!

We finished up 85 story points this month. See the July milestone for an overview of what we have worked on, and read on for more details.

· 4 min read
Diana Lau

Originally published on strongloop.com

Wondering what an interceptor is in LoopBack 4? 

Interceptors are reusable functions to provide aspect-oriented logic around method invocations. 

Seems pretty useful, right? There are 3 levels of interceptors: global, class level and method level. In this article, we are going to look into what a global interceptor is and how to use it.