Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
exogen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
26 ms
·
211.
▲
by
exogen
9y ago
I've used its JSON support extensively and no, it's not really the same at all. What you're saying is that you're OK with (1) planning to not use columns to store your individual data fields in the first place, forgoing
212.
▲
by
exogen
9y ago
One immediate improvement: SQL queries return rows of scalars. It's very tedious to reconstruct nested objects from the resulting column aliases that are ultimately necessary (and in this case, the client would even need to do it all t
213.
▲
by
exogen
9y ago
Digs at JSX aside, I think you may have lost track of what this thread was about: complicated nested conditionals. These are a pain to do in a single JS expression, JSX or hyperscript or otherwise – even in your example. In JSX your simple
214.
▲
by
exogen
9y ago
The reason OP's complaint is a bit silly is because JSX is just JavaScript and there's no need to be doing everything in a single JSX expression in the first place. That would be bad code just like any other situation. Do what you
215.
▲
by
exogen
9y ago
Conditional-markup solutions always look inelegant. I'd bet this looks absolutely crazy to many developers: <div *ngIf="foo; then bar else baz"></div> An essentially eval'd code string inside a
216.
▲
by
exogen
9y ago
I'll look it up on my Moto X.
217.
▲
by
exogen
9y ago
Please, tell me more about how you’ve profiled both the performance of my apps and my development productivity! Amazing of you to provide this for me. Meanwhile, NYTimes: > “Facebook developed it to provide a data source that can evolve
218.
▲
by
exogen
9y ago
It’s not. I’ve tried with Relay Modern. See the API I want elsewhere in the thread.
219.
▲
by
exogen
9y ago
Sorry what class hierarchy are we talking about here? This seems like an extremely contrived application of SOLID. (1) In what sense is my client making GraphQL queries depending on or tied to the available schema fields it does not qu
220.
▲
by
exogen
9y ago
The schema should still be documented somewhere, like any API. But even if it's not: GraphQL supports a special "introspection query" that will tell you the entire schema that you can query. Pointing a tool like GraphiQL ( ht
221.
▲
by
exogen
9y ago
I addressed that in the original post. That requires (1) adding potentially hundreds of boolean query variables to the query (and neither Apollo nor Relay give you any affordance for populating these from context, which you'd need for
222.
▲
by
exogen
9y ago
> Yes. If I know they intend to join data in, I can push it. Right, so if you don't have the full "query", which you don't with multiple REST round-trips, then you won't push it... > I can even do this somewha
223.
▲
by
exogen
9y ago
> I cannot see any positive outcomes to adopting graphql How about one HTTP request often being faster than multiple requests? How about only retrieving the payload you requested rather than all the extra data the API developers decided
224.
▲
by
exogen
9y ago
> Combinatoric explosions of complexity via a single query path are not a feature of every API. > Because RESTful APIs tend not to allow ad hoc graph traversal. I think you're taking this graph part too literally. Almost every AP
225.
▲
by
exogen
9y ago
> Okay but... I guess my question is: why are you denying a client the right to make a complex query? Is it because all your queries are kinda slow and so you must hand-optimize them, leading to a combinatoric explosion of codepaths? No,
226.
▲
by
exogen
9y ago
That would be a similar approach to the `getDataFromTree` function that Apollo offers: http://dev.apollodata.com/react/server-side-rendering.html#g... But it's way more work than just passing fragments up the tree
227.
▲
by
exogen
9y ago
Assuming I did build HOCs for doing so, the difference boils down to this: in your approach, query variable props would magically be passed down the component tree via `context` and used by descendant components in duplicated queries. The
228.
▲
by
exogen
9y ago
Yes, I'm saying that getting those props to those children in the first place is annoying to do and I'd still have to build a bunch of `context` helpers on top of Relay and Apollo to make doing that nice. This is the API I want:
229.
▲
by
exogen
9y ago
I've considered that, but it's extremely annoying (and still not really possible with Relay or Apollo). Not only would I be relying on Apollo's query batching/merging in order to not make 100 different queries over the n
230.
▲
by
exogen
9y ago
One thing I keep running into is that for a few of my app ideas, I'm not really interested in just having static queries known at build time, like Relay and Apollo are designed for. I specifically want them to be dynamic and actually b
231.
▲
by
exogen
9y ago
> it seems that implementing a GraphQL server is not an easy task It's actually really easy, I encourage you to look into it! I've written plenty of APIs over the years and it's one of the more pleasant experiences I'
232.
▲
by
exogen
9y ago
Another simple option for limiting complexity (I've considered implementing this in my GraphBrainz project): in the `context` provided to the GraphQL query resolver, increment a counter whenever a resolver requires fetching from an ext
233.
▲
by
exogen
9y ago
It was OP who compared them by calling out Apple, I just highlighted the absurdity of it. And no, Apple specifically highlights at every event that they have no interest in collecting such customer data and it’s a differentiating factor of
234.
▲
by
exogen
9y ago
> I think Apple's business model is entirely harmful Between Apple and Google, you think APPLE'S business model is the harmful one?! We're talking about (1) actually charging for their products vs. (2) tracking your every
235.
▲
Glimmer's Optimizing Compiler
(linkedin.com)
3 points
by
exogen
9y ago
|
0 comments
236.
▲
by
exogen
9y ago
FYI, Promise.all does not guarantee that. It doesn't orchestrate actually running the Promises at all (this is impossible the way Promises work), just that they're all resolved at the end, with results in the same order they wer
237.
▲
by
exogen
9y ago
"Public API" is the key part of #8, not just any change that consumers could find if they tried. Is the exact number of bytes your project consumes part of the public API? If it is (and I doubt there exist many projects that would
238.
▲
by
exogen
9y ago
Completely agreed. For me, writing YAML always feels like a guessing game. When I first encountered an ESLint config written in YAML, for example, it took me like a dozen tries (no exaggeration) to successfully convert a [2, "alw
239.
▲
by
exogen
9y ago
That's interesting, I wonder if Google Maps is different on iOS, where I use it – I find it utterly infuriating. Like most of us I'm plenty tech savvy and have used Google Maps since its inception. Using the latest app is the only
240.
▲
by
exogen
9y ago
I'm assuming it already exists due to the existence of pages like https://musicbrainz.org/tops/mb_top_stuff.html and https://stats.metabrainz.org , I'm just not positive of it. :) Even if it's
More ›