Git Product home page Git Product logo

Comments (11)

waldogit avatar waldogit commented on May 28, 2024 1

from relay-angular.

waldogit avatar waldogit commented on May 28, 2024 1

Hi Lorenzo, I am glad you elaborated how you started the apps, that pinpointed a huge blind spot on my part; things work correctly now :-) With that, I think the issue I described can be closed.

The other points I mention along the way could maybe be adressed in a new issue, but until then:
I added a commit to my sample project, it's pretty artificial but I hope it does get its point across. I added some explanation to the commit, let me know if it makes sense to you.

from relay-angular.

morrys avatar morrys commented on May 28, 2024

Hi @waldogit,
could you give me more details about your problem?

In the example project I created the relay.config.js file reads correctly

from relay-angular.

waldogit avatar waldogit commented on May 28, 2024

from relay-angular.

morrys avatar morrys commented on May 28, 2024

@waldogit it is always a pleasure to meet people who try new libraries and open issues to help improve them :)

To better analyze your problem, the example project would be very useful :)

from relay-angular.

waldogit avatar waldogit commented on May 28, 2024

from relay-angular.

morrys avatar morrys commented on May 28, 2024

I notice you switched off aot: is that a requirement? That is a serious limitation :-(

I honestly have not tried compiling aot in case there were any problems we could try to fix them!

Can the fragmentRefs come in in another way then as @input? I would like to
pass the fragmentRef as an angular route param. Can i resolve that route
param in ngOnInit, or will that be too late for the fragmentDecorator
function?

yes, you can do it

As for your sample project, I'll do some tests as soon as possible (I'm on vacation now) :)

from relay-angular.

morrys avatar morrys commented on May 28, 2024

@waldogit I tried your sample project and i created a PR waldogit/relay-angular-config#1 which allows it to be started.

Let me know what you think.

Lorenzo

from relay-angular.

waldogit avatar waldogit commented on May 28, 2024

from relay-angular.

morrys avatar morrys commented on May 28, 2024

Hi @waldogit,
I ran the application with yarn start (ng serve --plugin relay-angular-plugin) in the root.
Otherwise, nx serve relay-angular-config --plugin relay-angular-plugin is fine too.

I didn't understand the use case described here:

In your example, the answer is yes
because the query itself is resolvable from the query's own fragmentrefs.
But let's say I have a subcomponent that gets some ID from a route param.
Then I face 2 problems:1) AFAIK I should not pass a fragment ref, but an
argument definition. But that is not included in your API, is it?2) I guess
the roundtrip should be issued via a Query decorator, but how does that
query component know about the fragment of the other sub component? If I
look into the code, In react (of which i have 0 experience) there is
https://github.com/facebook/relay/blob/master/packages/react-relay/ReactRelayFragmentContainer.js.
Ideally there would be an equivalent of that in relay-angular - but that
does not sound simple. The alternative is that the application keeps track
of those. That becomes cumbersome: if a route param has several route
targets as children, then all those children need to reference that
fragment.

Can you show me in the sample project?

Thanks

from relay-angular.

waldogit avatar waldogit commented on May 28, 2024

It works, as you said! I am glad there is no race condition with resolving the fragment id. But the remaining issue is: pressing the 'Combine' leads to 2 roundtrips, one for the combinedQuery and one for the todoQueryQuery. How can they be bundled into a single roundtrip?

from relay-angular.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.