Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
scottmf
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
31 ms
·
301.
▲
by
scottmf
9y ago
Hmm, you're not quite thinking in GraphQL properly. That isn't how your schema should be designed. Your mother field should resolve to a Person type, with a mother and/or ancestors field, which would be a graphql list type of
302.
▲
by
scottmf
9y ago
I'm genuinely surprised by the number of people on HN who seem to know very little about what has been safe to call the successor to REST for quite some time. Forgive me if this sounds hyperbolic, but unless you have unusual or strict
303.
▲
by
scottmf
9y ago
Could you clarify what you mean? Got an example?
304.
▲
by
scottmf
9y ago
Great, some meaningless numbers without context.
305.
▲
by
scottmf
9y ago
I agree it seems like a silly thing to do (block browsers without a valid reason, of which there are very few), but to blame JavaScript or modern web development in general is ridiculous. The user agent string is not a JavaScript concept. T
306.
▲
by
scottmf
9y ago
> AFAIK GraphQL is not good at querying recursive datastructure, it's better at "neighborhood" kind of query, so you can traverse Foreign Keys, but not "indefinitely". That isn't true. You can request data i
307.
▲
by
scottmf
9y ago
There's no "The Email Company" to fix such vulnerabilities. Given the damage that could have been caused, the prank is incredibly harmless. At worst it has temporarily embarrassed a few people already shown to be immune to em
308.
▲
by
scottmf
9y ago
This guy Reddits
309.
▲
by
scottmf
9y ago
Oh come on. It's a form of social engineering and I'd say it has a net benefit for society. These emails have brought to light some weaknesses in these systems. Hopefully they'll be patched very quickly.
310.
▲
by
scottmf
9y ago
Why would you want to use callbacks? Here's a code example from an npm package I was looking at, vs how I would rewrite it in modern JS: https://gist.github.com/scf4/8157abd755eb9c232e87dcc342b78b4... Some of it m
311.
▲
by
scottmf
9y ago
Function declarations work like this typeof myFn === 'function'; // true function myFn() { }
312.
▲
by
scottmf
9y ago
You can technically still use var if you wish, but I'm not sure of any reasons to do so. When switching to let/const, bear in mind the difference in scope: var is function-scoped: (function () { var x = 1; })();
313.
▲
by
scottmf
9y ago
Looks great. I love modern JS, and the faster everyone can move on, the better! I didn't see any async/await stuff though, is there a reason for that? I'd imagine it would make some code much easier to follow.
314.
▲
by
scottmf
9y ago
What why?
315.
▲
by
scottmf
9y ago
Yep. They turn a blind eye to all of it because they profit from it. If I weren't so politically burnt out right now I'd call for a Reddit boycott. Either way this thread has reminded me to block it and delete my account because I
316.
▲
by
scottmf
9y ago
Simple indeed.
317.
▲
by
scottmf
9y ago
Comments on HN can be just as toxic. The only difference is people give a lot of weight to what's posted here.
318.
▲
by
scottmf
9y ago
I feel like accounting for people who like everything would be one of the first things built into such an algorithm. He should try alternating the privacy settings with each post.
319.
▲
by
scottmf
9y ago
They're not writing queries/API calls inside components. They're defining the components' data requirements alongside the components.
320.
▲
by
scottmf
9y ago
It should be able to. I'm using websockets in Apollo with a JS back end.
321.
▲
by
scottmf
9y ago
Take a look at Apollo. https://github.com/apollographql/apollo-client
322.
▲
by
scottmf
9y ago
They're not using React right now. If you read the article it says they'll be introducing the new version over the next several months. A lot of this "JS is slow, what happened to good old HTML and CSS, get off my lawn"
323.
▲
by
scottmf
9y ago
Seems like it's all you ever see here lately. I really should avoid reading HN comments on new web technologies.
324.
▲
by
scottmf
9y ago
Which n+1 problems doesn't dataloader solve?
325.
▲
by
scottmf
9y ago
I'm not sure anyone would find this simpler or more readable than React at all. https://facebook.github.io/react/docs/hello-world.html
326.
▲
by
scottmf
9y ago
You won, get over it.
327.
▲
by
scottmf
9y ago
You say that as though they don't make some of the best laptops out there.
328.
▲
by
scottmf
9y ago
Isn't that what yarn.lock and NPM shinkwrap are for? I wouldn't recommend putting the entire node_modules dir in git...
329.
▲
by
scottmf
9y ago
It's slower for a reason. I'm not sure why they'd switch after a decade simply because Google asked them to.
330.
▲
by
scottmf
9y ago
It's 2017. All modern browsers support JS and it's no longer reasonable to expect all websites to work very well without it.
More ›