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

trouble inputting number array in postgres using loopback

I have a table in postgres with a column called user_ids with its type set to integer[] However, in defining the model for the table, I cannot seem to get it right, that when I try posting to the table, it always gives me an error. I have tried…
Vikram Khemlani
  • 555
  • 6
  • 17
0
votes
1 answer

How to send csv generated stream as a file to the client using loopback 4

I am fairly new to nodeJs and loopback. I am trying to implement a feature that serves a csv stream to be downloaded in the client side once user clicks on "Export to csv" in Loopback 4. I have already implemented function that gives me the stream.…
Jestin
  • 1
  • 2
0
votes
1 answer

How to change the HTTP error about the password length in loopback 4?

I am using loopback 4 authentication and I have this credential schema. In my register method I am getting this http error response when giving a password shorter than 8 characters. I'm trying to avoid error message in the response that the…
0
votes
1 answer

Mock any service in Loopback-4 e2e test

i'm using loopback-4, Any idea how to mock any service call while running e2e test? like db service or token service etc. i know we can mock unit test using sinon, but is it possible to mock any service in e2e?
ni-met
  • 23
  • 3
0
votes
2 answers

LoopBack 4 - why it was published if its not a finished product

I have experience with Sequelize and TypeORM. LoopBack looks like a good alternative, so I tested it. But it looks like LoopBack 4 is not a finished product; it barely has the needed features for a production application. My question is: why the…
EmileC
  • 39
  • 4
0
votes
1 answer

Argument of type {....} is not assignable to parameter of type 'string | URL'

Could you help me with the error in my code. I am trying to connect Mailchimp to my app, so that when a user subscribes with an email, it is directly added to "audience" in Mailchimp. I have written the code, but the code is complaining about…
NZMAI
  • 536
  • 5
  • 27
0
votes
1 answer

How to post model with hasMany relation

I'm setting up an api using LoopBack 4 and its mysql connector. So I have a model Plane, which has a @hasMany relation with pilots : class Plane extends Entity { @property({ id: true,"dataPrecision": 10, "dataScale": 0, "nullable":…
CeBa
  • 46
  • 3
0
votes
1 answer

How to fix: ORA-00942: table or view does not exist' when querying Oracle with TypeORM and Loopback4

I'm trying to query an Oracle table with Loopback4 and TypeORM but i ORA-00942: table or view does not exist. Morover, after a while, i get another error like this: 'Cannot create a new connection named "default", because connection with such name…
Yanosh
  • 368
  • 5
  • 15
0
votes
2 answers

How to return the result of a 'then' callback function to the loopback 4 controller

I'm trying to perform a 'find' function on a TypeORM Entity inside my loopback4 controller. The problem is that according to TypeORM documentation I've executed the query in the 'then' callback function attached to the 'createConnection' function.…
Yanosh
  • 368
  • 5
  • 15
0
votes
1 answer

Async Await with four nested loops

I am currently trying to return a JSON object array that requires me to do one asynchronous function and then four nested asynchronous map functions in order to populate an array of entities. Basically, each user has an array of orders, each order…
0
votes
2 answers

LoopBack4: access repository inside an Interceptor

I'd like to enhance an Interceptor in my LoopBack4 application, which currently simply prints me the start and end of a controller method call on the command line - as described here: https://loopback.io/doc/en/lb4/Interceptors.html My…
MIB
  • 337
  • 2
  • 15
0
votes
1 answer

Loopback/mongodb: find all jobs that share a certain skill

I have a collection of jobs that have certain skills. Please see the pic below. As you can see each "job" object has a "skills" array. Skills are shared between different jobs, thus I need to write a get request, so that when a user clicks a skill,…
NZMAI
  • 536
  • 5
  • 27
0
votes
0 answers

Verify account endpoint in loopback

I am trying to implement verify account endpoint in loopback4 thorugh mailgun, since I am new in loopback4 and typescript in general, I am not sure if I am doing the right way. I want to retype the following code in the picture for loopback.I have…
NZMAI
  • 536
  • 5
  • 27
0
votes
1 answer

passport component registration field (MODULE_NOT_FOUND) after mounting loopback 3 inside loopback4

I am trying to upgrade from loopback 3 to loopback 4 using "mounting strategy" according to the documentation. while trying to run the app using npm start, i am getting the following error: node -r source-map-support/register . Cannot start the…
Omtechguy
  • 3,321
  • 7
  • 37
  • 71
0
votes
1 answer

Change loopback default model User to Member

I just don't want to use the name "User", I want it to be "Member" //// this is for bypassing stackoverflow qualiy control
Tam Trinh
  • 11
  • 1