question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Engine support

See original GitHub issue

Engines, and likely nested addon, the following throws since this.app is undefined: https://github.com/bgentry/ember-apollo-client/blob/master/index.js#L20

What I think should happen is it should walk up the parent hierarchy until it finds a parent that implements the apollo config that it’s looking for. In the case of an engine, it would likely mean the engine’s index.js would have the config hanging off it. Otherwise, it would continue up to the host app which might implement the config.

A quick fix would be to read the config off the host app (which is currently implied by today’s implementation by replacing this.app with something like this._findHost(). That’s currently what I’m doing on my fork: https://github.com/jasonmit/ember-apollo-client/blob/master/index.js#L21-L22

Thoughts? I can implement either fix but would like to gather consensus first.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
jasonmitcommented, Jul 25, 2018

Things get hairy when you start to consider what happens when both the host and an engine depend on ember-apollo-client, or two engines do — it would be great to lean on the solutions for those scenarios already implemented in auto-import.

Totally agree @dfreeman. Currently ember-auto-import doesn’t have a solve for bundling intelligently.

Lets move forward with ember-auto-import with the assumption it will one day be smarter around bundling. It should in the meantime eliminate the module resolution issue. I don’t personally care if it’s in the host vendor or engine’s vendor file. It will just be an edge case that can be solved with documentation in the meantime.

I can work on the switch to ember-auto-import if you’re on board.

1reaction
jasonmitcommented, Sep 19, 2018

Resolved in 2.0.0-beta.1, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Motor Mounts for Volkswagen Beetle for sale - eBay
5pcs Engine Motor & Transmission Mount for Volkswagen Beetle Golf Jetta Passat (Fits: Volkswagen Beetle). $110.50. Free shipping.
Read more >
Engine Mounts and Supports - Pacific Customs
Weld On Support Bracket For Beetle Engine Case To 1.25 Tube Rear Off Road Bumpers Part Number: ac707225. Price: $65.70 USD. Quantity in...
Read more >
Engine and Transmission Mounts - Dune Buggy Warehouse
Engine Mounts and Transmission Mounts for VW Beetle, Dune Buggy, Sand Rail, and Baja Bugs. Engine mounts, motor mounts, transmission mounts, ...
Read more >
Volkswagen Beetle Engine Mount - Advance Auto Parts
Low prices on Engine Mount for your Volkswagen Beetle at Advance Auto Parts. Find aftermarket and OEM parts online or at a local...
Read more >
Mounts | Classic VW Parts for Beetle, Bus, Ghia, Thing ...
Filter By Brand · Filter By Vehicle · Engine Rear Hanger Mounts, Fits 1969-1973 Type 3 · CB Performance Rhino Style Transmission Mount...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found