Live data from Hacker News

Apollo Client 1.0: A flexible, community-focused JavaScript GraphQL client

dev-blog.apollodata.com

61–70 of 81 posts

Re: Apollo Client 1.0: A flexible, community-focused JavaScript GraphQL client

#61
post #30
post #9

Earlier quoted context omitted.

I'm kind of hoping that nesting resources becomes a non-issue in the future once HTTP/2 is widespread. Ideally you don't ever nest resources. With HTTP/2 the overhead of additional requests can be significantly lower, and you get the benefit of using client cache. This becomes pretty powerful once cache digests land, so a HTTP/2 REST service can just proactively push only the resources to the client that it has an (u…

GraphQL has a lot more to offer than just batching requests. I think that's one of the less important features actually. A common way to declare exactly what objects and attributes you want is more important, you can invent something like that for REST but you'd be reinventing the wheel for every endpoint.

Exactly. For the first time you have a common language to talk to your RDBS, NoSQL db, cache system and API, or a mix of all of them transparently, from anywhere in your architecture, including remote microservices and the browser.

Re: Apollo Client 1.0: A flexible, community-focused JavaScript GraphQL client

#62
post #10

It's been a bit, but I found the ergonomics and flexibility of Apollo to be miles ahead of Relay. I also found it fairly straightforward to set up Server Side Rendering (SSR). My example is at https://github.com/rattrayalex/isomorphic-react-relay-router... if it helps anyone, though it's a year out of date. EDIT: A more up-to-date example at https://github.com/rattrayalex/django-graphql-react-ssr/blob... – meant to o…

Interesting. I haven't used Apollo in production. Are there specific things (apart from mutations!) that it makes easier?

Mutations are much simpler. Cache updating is flexible and easily customised. They have subscriptions and polling. Fetch More for pagination. Generally clear and flexible to work with

Re: Apollo Client 1.0: A flexible, community-focused JavaScript GraphQL client

#64
using graph.cool (https://www.graph.cool/) it save me the need to write backend, this is not just code writing but also API design which is hard and changing, so I can iterate on the client code and redesign and I don't need to iterate on the server the server is just there and I know it is ready to whatever I need on the client, graph.cool integration with Algolia and Auth0 also work fine for me and allow me to complete my MVP along a development happy path, all high-quality component I grab into my stack with minimal integration effort

Re: Apollo Client 1.0: A flexible, community-focused JavaScript GraphQL client

#65
post #28

Earlier quoted context omitted.

HTTP/2 doesn't fix the problem of loading data dependencies over a connection with a noticeable round trip latency. Even with server push, you need some way of defining what is to be pushed. As a very contrived example, one page might show users who have access to servers in availability zones in aws regions. With an unnested rest api doing nothing intelligent with server push over a 250ms round trip, you're looking…

Falcor sort of solves this by allowing you to communicate "references" in the graph. For example, it might inform you that users.52.friends.1 is actually users.45, so the client will cache it at that location instead. This is less complicated than GraphQL's solution of using the Relay Node interface.

Relay and GraphQL aren't the same beast. One of the reasons to choose Apollo is to avoid the extra complications which Relay adds.

Re: Apollo Client 1.0: A flexible, community-focused JavaScript GraphQL client

#66

This is not a knock on Apollo in particular, but I am wholly underwhelmed by what gets hyped up in this industry. There isn't anything novel here. A new generation of programmers rediscovers Remote Procedure Call (they call them mutations), schemas (NoSQL was so last year), and various older concepts and rehashes it while putting down a strawman they claim is Representational State Transfer (which if they read the th…

Many great open source products have huge commercial backers--the important thing is that there is a community, which is in fact very true with Apollo.

I get what you're saying and I'm sure there is lots of truth to it--that doesn't make what's going on now the best to ever do it (i.e. the fastest way to produce the most meaningful user experiences). If it wasn't the case, we'd be doing remote procedure calls in C or whatever.

Bottom line: ur point is one that should be heard, but there's a way more value could be added in how you present it.

Re: Apollo Client 1.0: A flexible, community-focused JavaScript GraphQL client

#67

We use Apollo for the http://expo.io/ client and have found it to be extremely pleasant to use. I love how flexible it is too -- you can use it for weird things like building an ORM layer for SQLite. For example: https://github.com/brentvatne/apollo-sqlite-experiment/blob/... -- the queries here go through a custom NetworkInterface which use a pretty simple graphql resolver ( https://github.com/brentvatne/apollo-sqli…

What is the expo.io client? The site you linked has a broken certificate and then just replies "default backend - 404".

Re: Apollo Client 1.0: A flexible, community-focused JavaScript GraphQL client

#68
post #57

Hopefully a GraphQL server can't be far behind. Edit: I guess you do something like this: https://github.com/RisingStack/graphql-server/blob/master/sr...

The Apollo team also provides some superb GraphQL server tooling:

http://dev.apollodata.com/tools/

The ability to express your schema in GraphQL instead of JS is especially nice. The server+client Apollo experience is really nice if you give it a try, and judging by the roadmap laid out in the blog post there are a lot of benefits to come.

Re: Apollo Client 1.0: A flexible, community-focused JavaScript GraphQL client

#69
I'm in total love with Apollo Client! I'm using it at work with a custom graphql backend and on personal projects using http://graph.cool which just rocks! I hope the community will grow with people who use angular with apollo-angular as well.

Re: Apollo Client 1.0: A flexible, community-focused JavaScript GraphQL client

#70

We use Apollo for the http://expo.io/ client and have found it to be extremely pleasant to use. I love how flexible it is too -- you can use it for weird things like building an ORM layer for SQLite. For example: https://github.com/brentvatne/apollo-sqlite-experiment/blob/... -- the queries here go through a custom NetworkInterface which use a pretty simple graphql resolver ( https://github.com/brentvatne/apollo-sqli…

What is the expo.io client? The site you linked has a broken certificate and then just replies "default backend - 404".

Works fine for me. Check your computer for viruses.
Post reply on HN