Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 16:43
    uniconstructor edited #4126
  • Jan 31 16:41
    uniconstructor edited #4126
  • Jan 31 16:41
    uniconstructor opened #4126
  • Jan 31 03:44
    dzungh0ang closed #4123
  • Jan 30 00:25
    techaks closed #4125
  • Jan 30 00:02
    techaks edited #4125
  • Jan 30 00:01
    techaks opened #4125
  • Jan 29 23:33
    jkpulido opened #4124
  • Jan 29 13:32
    nabdelgadir closed #4114
  • Jan 29 09:17

    bajtos on add-node10

    (compare)

  • Jan 29 07:13
    dzungh0ang opened #4123
  • Jan 29 04:25
    dhmlau closed #3881
  • Jan 28 13:14
    bajtos edited #4119
  • Jan 28 12:47
    bajtos labeled #4121
  • Jan 28 12:46
    bajtos labeled #4118
  • Jan 28 12:46
    bajtos labeled #4118
  • Jan 28 12:46
    bajtos labeled #4118
  • Jan 28 12:46
    bajtos assigned #4118
  • Jan 25 19:50
    dhmlau closed #3906
  • Jan 25 19:13
    mschnee synchronize #4119
Nico Flaig
@nflaig

Hi guys,
the unique key options on models seems to be not working anymore. Even in the lb4 example shopping app it is possible to create multiple users with the same email but its shouldnt, see: https://github.com/strongloop/loopback4-example-shopping/blob/master/packages/shopping/src/models/user.model.ts

Would be interesting to know if someone else faces this issue.
Thanks in advance

Matthew Miller
@mamiller93
@shubhambtps_twitter wouldn’t passing the model as the schema make the requestBody use the AJV validator?
@nflaig lol
Matthew Miller
@mamiller93
Is there a way to validate a model in loopback4 that didn’t come from a requestBody?
Matthew Miller
@mamiller93
??
Saad Ismail
@saadismail
Asjad ® 🤷🏻‍♂️
@ChAsjadMahmood3_twitter
[image.png]
I am following the simple todo app tutorial from loopback 4 docs and getting this error when sending the post request
Henry667
@Henry667
Need help. How to add where with include filter in stronlopp methoids
{ "include": [ "payments"],"scope":{"where": {"amount": "450"}}}
?
Any help you can make guys
Henry667
@Henry667
in payment, array i want to find out the amount that contain only 450
Henry667
@Henry667
Any help guys
Morris Zeitouni
@MorrisZeitouni_twitter
For the cloudant datasource connector, is it possible for findById method to use the efficient 'lookup by id' of Cloudant rather than a query (_find method) which is by default? Lookup by Id is 10x cheaper than a _find
Leryll Louie Piol
@louiepiol
Anyone know how to connect firebase to lb4?
chandrumani
@chandrumani
Hey guys, looking for setting timeout for the lb4 API's. If third party takes time to respond, lb4 api's shouldn't wait till it receives the response. Any idea how to handle this ?
Diana Lau
@dhmlau
@louiepiol Have you tried this community firebase connector? https://www.npmjs.com/package/loopback-connector-firebase.
Diana Lau
@dhmlau
@MorrisZeitouni_twitter I remember there was a discussion about using lookup instead of query, but I cannot recall the outcome. Do you mind opening an issue in https://github.com/strongloop/loopback-connector-cloudant? Thanks.
Matthew Miller
@mamiller93
Looks like loopback migrations don’t support multiple datasources if you’re trying to migrate a select few models. It will check if that model is supported by all datasources which, unless I don’t understand the link between repositories and datasources, doesn’t make sense
Matthew Miller
@mamiller93
Also what’s the benefit of calling other API through services instead of simply calling the darn thing directly from import (etc)?
Leryll Louie Piol
@louiepiol
I end up using firebase sdk instead of community connector @dhmlau
Can I still create service without datasource generator won't me?
田宝勇
@tianbaoyong_gitlab
How to connect and use qiniu storage in LoopBack project?
Who can help me?
sunilsmith
@sunilsmith
I have question related to hasMany relation and cascading ORM level in loopback4, i have posted the complete scenario on stackoverflow(https://stackoverflow.com/questions/57391303/using-hasmany-relation-and-cascading-orm-level-in-loopback4), can someone help us with a solution
Diana Lau
@dhmlau
@sunilsmith , i've responded in your stackoverflow post.
Diana Lau
@dhmlau
@tianbaoyong_gitlab , I don't have any knowledge about qiniu, but i just found this: https://www.npmjs.com/package/loopback-component-storage-qiniu. Were you able to use this community module?
田宝勇
@tianbaoyong_gitlab
@dhmlau thanks I try it today!
Diana Lau
@dhmlau
Hi everyone, we're pleased to share that LoopBack won the API World’s 2019 Best in API Middleware category! :tada:
For our announcement blog post, please see https://strongloop.com/strongblog/loopback-2019-api-award-api-middleware/
Pete Hurl
@MoribundMedium

Hello! I'm very new to LoopBack and I have a question if anyone has the time. I'm trying to use an external API with my application, similar to this demonstration (https://loopback.io/doc/en/lb4/Calling-other-APIs-and-web-services.html), and I'm not sure how to handle the return values. The objects returned from the API have more properties than the model in my application and I'd like to strip those out. However, I'm not clear what the recommended method is. Perhaps using a DTO to map and remove the unneeded properties? But there's no documentation for building DTOs even though they're mentioned in the tutorial. Or should the model be handling this already and I configured it wrong?

By the way, congrats on the API World award!

Pete Hurl
@MoribundMedium
Hm... Well, I got it to work by mapping the return values to new objects. Not sure if that's how it's supposed to be done, but it works. It just feels a little weird using a return type of any[] in the service, since using a type doesn't seem to do much. Controller mapping code, in short:
@get('')
async getExternalApiObjects(): Promise<ExternalApiObject[]> {
  return await this.externalApiService.get().then(function(objects) {
    return objects.map(obj => new ExternalApiObject(obj));
  });
}
Darko Damljanović
@darko.damljanovic1_gitlab
Hello. Is there any good way of handling and merging multiple entities to serve single REST endpoint? I have a scenario where I need to get data from a database and merge them as one organized response object as a combination of multiple entities?
hgeldenhuys
@hgeldenhuys
How do you change the URL and Port for a LoopBack App's Swagger and Rest API?
On LB4 app using cli
Jam Risser
@codejamninja
It should follow this schema
hgeldenhuys
@hgeldenhuys
Thanks @codejamninja That's the Swagger bit, and the API server, aka the URI Swagger will call?
In otherwords when you start the app:
Server is running at http://[::1]:3000 Try http://[::1]:3000/ping
Jam Risser
@codejamninja
Is that what you are looking for?
hgeldenhuys
@hgeldenhuys
Yep, that's the one
Jam Risser
@codejamninja
Oh, so you want to change it
hgeldenhuys
@hgeldenhuys
That's right
Jam Risser
@codejamninja
Change the following
    this.bind(RestExplorerBindings.CONFIG).to({
      path: '/explorer'
    });
It won't change the port though, because it runs on the same app
hgeldenhuys
@hgeldenhuys
Oh sorry man, the port and host is what I'm trying to change. Ie the HTTP Server settings, not so much the path
Jam Risser
@codejamninja
I guess you could have an nginx server with rewrite rules that does a proxy_pass upstream into the explorer path, but I'm not sure why you would need to go to all that trouble.
You could do something like the following, and instead of proxying into example.com, you would proxy to http://localhost:3000/explorer