Questions tagged [loopback4]

Questions about LoopBack version 4. Use this tag for LoopBack questions which are specific to only version 4. General LoopBack questions should be tagged with loopbackjs.

Create powerful APIs easily with a new creation experience for defining REST APIs and handling API requests/responses.

A new, improved programming model with dependency injection and new concepts such as components, mixins, repositories, etc. make this the most extensible version yet.

See also

483 questions
0
votes
1 answer

loopback-connector-postgresql: jsonpath in the "where" condition

The model is stored in postgresql. Something like: { id: data: { someIds: [, ...] } } How to add a rule jsonb_path_match(data::jsonb, 'exists($.someIds[*] ? (@ == 3))') to the filter (where)? In this case,…
0
votes
1 answer

Loopback 4 - Mongo and Elastic data synchronization

Is there an easy way to sync MongoDB data with Elastic if we are using a Loopback 4 application? (In a NodeJS Express application we can easily do this using mongoosastic plugin.) Currently in loopback a model is bound to one data source which is…
0
votes
1 answer

How to create customer error handler in loopback 4

I want to error or response should be like // if error accrue then { error:{ meaage:"custome message", description:"custome message" }, data:null, status:404 }
0
votes
0 answers

common authorization for all API in LoopBack 4

In LoopBack 4 framework, for any secured API call, I need to authenticate the request for every endpoint. Instead of this approach i wants to configure that verification globally like LoopBack 3. Any solution for this? …
Anto Hevin
  • 23
  • 7
0
votes
1 answer

What is the sintax for include nested relations api for Loopback 4? Loopback3 works

On Loopback 3, I can use api for nested queries like these one: http://localhost/api/ServiceOrders?filter={ "where": { "id" : 4 } , "include": [ { "itemModel" : "itemBrand" }, "itemSize" ] } For Loopback4 I…
fhansen
  • 43
  • 6
0
votes
1 answer

Is there a way to create one array properties with many mongoDB objectiID inside

I use Loopback4. When i want to add a mongoDb ObjectId property inside my model i do that : @property({ type: 'string', mongodb: {dataType: 'ObjectID'}, }) organizationId?: string; Now i want to make an array with…
0
votes
1 answer

How do I invoke authorization on every REST call in loopback 4?

In loopback4, I have created custom authentication and authorization handlers, and wired them into the application. But the authorization handler is called only if the authentication function returns a UserProfile object, and skips authorization for…
broc.seib
  • 21,643
  • 8
  • 63
  • 62
0
votes
1 answer

Loobback4 belongsTo relation isn't working with REST query?

I'm getting the error: Unhandled error in GET /message-templates?filter[include]=groups: 500 TypeError: include.filter is not a function at Object.includeRelatedModels…
jscul
  • 748
  • 1
  • 10
  • 25
0
votes
1 answer

Connecting to Neo4j with Loopback connector neo4j, result gives HTTP endpoints

I have a backend created with Loopback4 , i installed the loopback-connector-neo4j connector, created a datasource. In my code i run a cypher raw query. As a result i obtain HTTP endpoints for Nodes and Relationships instaead of real data as is: { …
Laurent Bois
  • 184
  • 3
  • 11
0
votes
0 answers

Loopback 4: Query the relation model

I am new to Loop Back, but I want to use it for my upcoming API application. I am currently testing the features it has to offer, but I'm stuck on doing an advance query on a sub model of my root entity. I apologize in advance if this is already…
Peruz Carlsen
  • 572
  • 2
  • 10
0
votes
1 answer

how to apply search api in loopback 4 framework of node js

I have created a get api in which i want to apply search through name in query param. that is if we don't enter query param in same api it displays full list and if we enter any query param then it will show that result only. How can i do it??? Here…
neetz
  • 21
  • 1
  • 6
0
votes
1 answer

How to apply search api in loopback4

I am getting list of products through a get api. I want to apply search api in that get api(in which we are fetching full list of product). that is i want to give name parameter as optional. If user enters name in search box then api will search…
0
votes
0 answers

How deploy a project loopback 4 to vps

I have a project bill by loopback 4 use bitbucket to save source. Now I want to deploy project on vps. My vps use OS centos 8. I installed Node, MongoDB, ... I also install pm2 and config nginx. I tried copy file dist from local to server and use…
Huan Ho
  • 145
  • 2
  • 9
0
votes
0 answers

count number of order every hour with loopback4

Salem, I have tried to return the number of order per hour, so i need to extract the hour in the property createdAt in my order Model that's why i think to use The getHours() method returns the hour for the specified date. My method: …
H_Hmd
  • 25
  • 8
0
votes
0 answers

Loopback 4 add a custom put request with two parameters

I am trying to make a put request on the url http://[::1]:3000/carts?filter[where][user_id]=5&filter[where][cart_id]=52 with two parameters respectively 'user_id' and 'user_id'. This is what I have tried…
pratik jaiswal
  • 1,855
  • 9
  • 27
  • 59