Live data from Hacker News

Urql: a GraphQL client library

formidable.com

41–50 of 79 posts

Re: Urql: a GraphQL client library

#41

Earlier quoted context omitted.

Hi from Apollo! We appreciate your honest feedback. Part of my team (Developer Experience) is responsible for our documentation. What features are inadequately documented? We'd like to fix that for you if we can.

I agree with other commenters that Apollo is too big and too opaque to easily understand. The docs don’t have enough examples and are out of date in some places (see link-state). I’ve had a lot of confusion while trying to implement Apollo in my current react project. I’ve also seen some erratic behavior from Apollo. While testing I found that Apollo deduplicates queries too aggressively. I made some mutations with s…

Deduplication shouldn’t work on mutations at all! There has got to be something else wrong. If I were to guess, it’s probably an issue with the Apollo React interface.

Also IDs aren’t required for cache updates, only the typename.

Re: Urql: a GraphQL client library

#42
post #38

There is also the new GraphQL integration into mobx-state-tree that was just announced last week by the author of mobx, you can check it here https://github.com/mobxjs/mst-gql

> this project closes the gap between GraphQL and mobx-state-tree as state management solutions. GraphQL is very transport oriented, while MST is great for client side state management. GraphQL clients like apollo do support some form of client-side state, but that is still quite cumbersome compared to the full model driven power unlocked by MST, where local actions, reactive views, and MobX optimized rendering model…

It is pretty cool indeed, you can watch his presentation of the project here https://www.youtube.com/watch?v=Sq2M00vghqY (disclosure, I organize this conf).

Re: Urql: a GraphQL client library

#46

Earlier quoted context omitted.

A more consistent documentation experience. A lot of code examples import various modules, but those modules have no documentation. For example: Docs > Client > Apollo Link mentions `graphql-tools` and schema stitching, with a link to read more. Clicking that link takes you to a page that says it's deprecated, and then links to a blog post about why. Another example: Is `apollo-link-state` deprecated? The docs for `a…

Similar to the deprecation issue, a number of Links still say "under active development" or similar pre-release "warnings" in their GitHub READMEs but that isn't reflected in the documentation site, making it tough to figure out what is considered stable and what isn't without jumping back and forth between GitHub and the documentation site, and there's still questions of whether or not perhaps the README warnings ar…

Indeed. It boils down to having no trust in the documentation because of the conflicting messages.

Re: Urql: a GraphQL client library

#47

really interesting, but i took a look at the docs, and they 100% look like urql is only compatible with react. Can I use urql with Vue.js, or would I just be inviting misery upon myself if i tried?

> Can I use urql with Vue.js

Would like to know this also.

Re: Urql: a GraphQL client library

#48
Most of graphql client library is non-lazy on url part. In my apps, i use a lazy apollo client API interface though:

const data = useQuery(url, graphql_query, variables)

The point here is that, the ApolloClient is lazily constructed and reused only when the hook is called.

I don't know why Graphql must be used with non-lazy url instead.

More than that, you don't need a Provider, because the apollo-client is reused between the calls.

Re: Urql: a GraphQL client library

#49

really interesting, but i took a look at the docs, and they 100% look like urql is only compatible with react. Can I use urql with Vue.js, or would I just be inviting misery upon myself if i tried?

we've been using apollo with vue.js (and typescript!) with a django-graphene backend and we've been having zero problems.

honestly, it's my favorite stack nowadays.

Re: Urql: a GraphQL client library

#50
post #6

Excited to see some competition for Apollo. Apollo may do lots of things but exactly what and why and how remains a mystery to me. Apollo just feels needlessly large, opaque, and inadequately documented to me. Reading about urql, the combination of minimalist architecture with first class support for React hooks sounds like just what I'd been hoping would emerge.

Hi from Apollo! We appreciate your honest feedback. Part of my team (Developer Experience) is responsible for our documentation. What features are inadequately documented? We'd like to fix that for you if we can.

- The `Query.variables` prop. The docs don't explain very well when exactly the network call will be reinvoked, especially if the graphql query has variables with default values (there's an open issue about this with little activity: https://github.com/apollographql/react-apollo/issues/2715).

- The `Query.skip` prop. I'd like to know all of the expected behavior for when this prop is used. For example, I've noticed that when skip is true then the render prop function's `data` object is always undefined, even though the data is there! Also when skip is true and you manually trigger a refetch elsewhere (for example when running a mutation with `refetchQueries` specified), the `onCompleted` prop doesn't get called, even though the query was in fact refetched and completed.

Those are just recent things I've noticed. Also for the record I don't mean to sound like I'm throwing shade. I appreciate all open source work and the Apollo projects are massive open source contributions, so thank you :)

Post reply on HN